I'm creating a minigame-based game, and the main function is teleporting the players to the selected maps (from a server script in ServerScriptService). However, when testing it in multiplayer, I found out that it teleports one player and then teleports the next player when the round is over. Any help would be appreciated :).
for i,player in ipairs(game.Players:GetChildren()) do
if player~=nil then
if player.Character:FindFirstChild("HumanoidRootPart")~=false then
print("its all relative!!!")
if player.Character.Humanoid.Health~=0 then
local ransp = mapSpawn[math.random(1,#mapSpawn)].CFrame*CFrame.Angles(0,180,0) + Vector3.new(0,3,0)
print("ITS ALL RELATIVE")
player.Character.HumanoidRootPart.CFrame=ransp
wait()
end
end
end

1 comment
THANK YOU SO MUCH <3 I THOUGHT MY GAME WAS OVER THANK YOU THANK YOU <3<3 :))