Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I teleport ALL players to a part?

Asked by 6 years ago

I don't have any tests yet but I know you can use Vector3.New or something. can someone help??

2 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago
for _, player in pairs(game.Players:GetPlayers()) do
    player.Character.HumanoidRootPart.CFrame = part.CFrame -- make part the part you want them to teleport to
end

note, if this runs as soon as the game starts, the player/character may have not loaded in yet and it wont work. (if you want to test it, just add a wait(2) at the top of the code)

1
Please add explanations to your answer. This doesn't help them learn how or why this works. H4X0MSYT 536 — 6y
0
ummm no need he helped me iiDoge_Legend 3 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

Roblox Wiki - Teleporting Within a Place: Has all the answers you need ;)

Answer this question