local numPlayers = 0 for i, v in next, game.Players:GetPlayers() do if v:FindFirstChild("TeamColor") == BrickColor.new("Bright red") then numPlayers = numPlayers + 1 elseif v:FindFirstChild("TeamColor") ~= BrickColor.new("Bright red") then numPlayers = numPlayers - 1 end end if numPlayers == 0 then local player = game.Players:GetPlayers() local pickedPl = math.random(1, #player) pickedPl.TeamColor = BrickColor.new("Bright red") end -- I think.. wait(60) a = game.Players:GetChildren() for i = 1,#a do player = a[i] player.Neutral=true player.TeamColor=BrickColor.new("White") game.Workspace[a[i].Name].Torso.Name=("") end
I have my script but now I want to make it to where everyone on one team teleports to a certain area and everyone on the other team goes somewhere else and then after 60 seconds they all teleport somewhere else
for _,v in pairs(game.Players:GetPlayers())do if v.TeamColor==BrickColor.new("White")and v.Character then v.Character:MoveTo(Vector3.new(200,0,0)) elseif v.Character then v.Character:MoveTo(Vector3.new(-200,0,0)) end end wait(60) for _,v in pairs(game.Players:GetPlayers())do if v.Character then v.Character:MoveTo(Vector3.new()) end end
Moves everyone on the white team to 200,0,0 and everyone else to -200,0,0
Waits 60 seconds
Moves everyone to 0,0,0