Transport characters from lobby to game area question

Hi,

I currently have code to transport characters from the lobby to the game area in my game. This happens at the beginning of a game round. The below code snippet shows what I am doing.

for _, player in pairs(game.Players:GetChildren()) do
local charac = player.character
.
. (some game specific code goes here)
.
charac.HumanoidRootPart.CFrame = GameAreaSpwan.CFrame (GameAreaSpwan is a transparent part with CanCollide set to false)
end

The above code works fine in my testing. Here’s my question. Say there are ten players in the game. They’ll all be transported to the location "GameAreaSpwan.CFrame " in the above code. Is that a problem? Will the players be all stacked on top of each other?

Thanks,
Leif_AW

Yeah, if it’s the same part each time. You could make multiple and do a random choice.

Make a folder of the spawns in the workspace:

local choices = workspace.MyFolder:GetChildren()

for i, v in ipairs(game.Players:GetPlayers()) do
    local hrp = player.Character.HumanoidRootPart
    local chosenNum = math.random(1, #choices)
    local chosenSpawn = choices[chosenNum]
    hrp.CFrame = chosenSpawn.CFrame
end

Thanks 12345koip for the fast and very helpful response! Much appreciated.

L:eif_aw