How do i make it so it spawns all players before running my next line of code?

So i want my every player to spawn in with CFrame before the next code runs.

		Player.CameraMode = Enum.CameraMode.LockFirstPerson
		character:FindFirstChild("Torso").CFrame = table.remove(AvailableSpawnPoints, math.random(#AvailableSpawnPoints)).CFrame +,10,0) 
for i = GameSettings.RoundTime, 0, -1 do
-- stuff

Don’t use spawn. The function passed is going to execute in another thread.

Also teleport the humanoid root part as it’s found in all body types, r6, r15, rthro aswell.

You can use a for loop to loop through all present players, and apply the CFrame to their Torso. Like so:

local Players = game:GetService("Players")

for i, Player in pairs(Players:GetPlayers()) do
    -- Apply CFrame to Player.Character.Torso

-- Next code here

As suggested above, don’t use spawn if you want to apply the CFrame to all player torso’s before moving on. spawn will execute the function in another thread, meaning the script will move on without waiting for the loop to finish.