I have recently started scripting and i want to know how to teleport everyone to a certain place, if you can, please send code and explain how it works ,Thank you
✓ ANSWER ACCEPTED
how do you teleport everyone in the server to a different position?
1 answer
✓ Accepted answer
Here's a script that should work:
local tpPart = workspace.TpPart
for _,player in pairs(game.Players:GetPlayers()) do
player.Character.HumanoidRootPart.CFrame = tpPart.CFrame
end
We used a for i,v in pairs() loop to loop through all the players in the server, then we're accessing their character's HumanoidRootPart and changing its CFrame to the TpPart's CFrame.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
CFrame is the Coordinate Frame of a specified part.