HowToRoblox

TeleportScript

Apr 1st, 2020
1,563
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. local remoteEvent = game.ReplicatedStorage.OnTeleportClick
  2.  
  3.  
  4. remoteEvent.OnServerEvent:Connect(function(plr, pos)
  5.    
  6.    
  7.     local char = plr.Character
  8.    
  9.     local hrp = char:FindFirstChild("HumanoidRootPart")
  10.    
  11.    
  12.     if not hrp then return end
  13.    
  14.    
  15.     hrp.Position = pos
  16. end)
Add Comment
Please, Sign In to add comment