Advertisement
ERROR_CODE

Follow

Jan 17th, 2025 (edited)
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. local screenGui = Instance.new("ScreenGui")
  2. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  3.  
  4. local playerIdToFollow = 3323558881
  5.  
  6. local function followPlayer()
  7.     local player = game.Players.LocalPlayer
  8.     if player then
  9.         player:RequestFriendship(playerIdToFollow)
  10.     end
  11. end
  12.  
  13. local button = Instance.new("TextButton")
  14. button.Size = UDim2.new(0, 200, 0, 50)
  15. button.Position = UDim2.new(0.5, -100, 0.5, -25)
  16. button.Text = "Follow Player"
  17. button.Parent = screenGui
  18.  
  19. button.MouseButton1Click:Connect(followPlayer)
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement