Not teleporting players to a part in a group called "Spawns"?
for _, player in pairs(game.Players:GetChildren()) do local spawns = game.Workspace.Spawns:GetChildren() local char = player.Character if char ~= nil then local num = math.random(1, #spawns) local spawnChosen = spawns[num] if char ~= nil then char:MoveTo(spawnChosen.Position) end end end
try this. your code fires as soon as the server starts up. put a wait for a few seconds and it should work.
the player is not in
Players
when the code gets the players tablei did test this solution a lot for you