Hello, i need a script for teleporting players to different coords (for example i want to teleport 8 players in their cars so they can start racing and i am an absoluete noob at scripting) Thank you very much if you help!
COMMUNITY QUESTION
How to teleport players?
1 answer
You should do this. I will leave comments everywhere explaining stuff.
local teleportpos = CFrame.new(0, 0, 0) --Insert the position where you want them to be teleported.
--I recommend putting the code in front in a function, so it will run multiple times.
for i, v in pairs(game.Players:GetChildren()) do
v.Head.CFrame = teleportpos --What this does, is that it moves the head. The rest of the body follows the head, so we don't have to manually move the rest too. Also, other people like moving the torso, but R15 have 2 torsos so I like using the head.
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
could use :moveto() http://wiki.roblox.com/index.php?title=API:Class/Model/MoveTo
No, as that makes the player walk to it. CFraming the head makes the player teleport to it.
Using
MoveToon the actual Humanoid object makes them walk.. Using on the Model will move it."CFrame" equivalent to
MoveTowould beSetPrimaryPartCFrame