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

Making a table with positions and teleporting all players in those random positions?

Asked by 8 years ago

Hi I was trying to make a game script with a table of my spawns. I would get all the players and do it so that they all spawn in the different positions in the table. Can you help?

1 answer

Log in to vote
0
Answered by 8 years ago

Well, make sure there are enough spawn positions compared to players.

pos={}--Your positions. Make sure they are in Vector3.new(x,y,z) format. Like: pos={(0,0,0), (1,1,1), ...}

for i,v in pairs (game.Players:GetChildren()) do
v.Character.Torso.CFrame=CFrame.new(pos[i])
end
Ad

Answer this question