Advertisement
KINGOFCOOL

Untitled

Jan 11th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. function onPlayerEntered(player)
  2. player.CharacterAdded:connect(function(char) --Anonymous function fired when player's character loads
  3. while wait() do -- Infinite loop!
  4. script.Parent.CFrame = CFrame.new(char.Torso.Position) -- Tele to player's position
  5. end
  6. end)
  7. end
  8.  
  9. game.Players.PlayerAdded:connect(onPlayerEntered) -- connects function to PlayerAdded event.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement