of     1   

Demrako
#183611108Sunday, February 14, 2016 8:35 PM GMT

local SpawnPoints = workspace.SpawnPoints:GetChildren() wait(5) for _, v in pairs(game.Players:GetPlayers()) do local RandomSpawnPoint = SpawnPoints[math.random(1, #SpawnPoints)] v.Character:MoveTo(RandomSpawnPoint.Position) end How can I make sure that 2 or more players will not teleport to the same location?
Haggie125
#183611732Sunday, February 14, 2016 8:44 PM GMT

Try making a parallel table of boolean values alongside the SpawnPoints table. Then check that table before you teleport them, and make sure that value isn't true. Then set it to true if it isn't, and teleport them. Else try another random number.
Haggie125
#183611864Sunday, February 14, 2016 8:46 PM GMT

Or make a function to randomly shuffle the SpawnPoints table and then assign a player to each one in order until you run out of players.

    of     1