Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I get all players?

If I did a teleportion script how would I get all the players to telport not just 1 person to telport

1 answer

✓ Accepted answer

Well first you would do a for statment such as

for i,v

then you would get all players.

for i,v (game.Players:GetChildren()) do

now you get their character and teleport them :D like...

v.Character:MoveTo(Vector3.new(INSERT CORDNATES HERE!))

or you could make it so that they all teleport to a part..

v.Character:MoveTo(Vector3.new(game.Workspace.Part.Position))

full code:

            for i,v in pairs (game.Players:GetPlayers()) do
                v.Character:MovTeTo(Vector3.new(INSERT CORDNATES HERE!))

hope this helped!

This discussion is preserved as it was. New answers, comments, and votes are closed.