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") for i, v in next, game.Players:GetPlayers() do if v~=pickedPl then v:findFirstChild("TeamColor")=BrickColor.new("Team Color Name") end end end
But now I need it to after a 5 minute round to kick everyone off the teams again
