Just wanted to make a round based game a bit less annoying. I want to make it keep checking again and again, so I can know when to end the round when ALL of the players are NOT on on a team AT THE SAME TIME. Could someone give me an example script so I can understand this a little bit better?
✓ ANSWER ACCEPTED
Does anyone know how keep checking if all players are not on a team?
1 answer
✓ Accepted answer
You can use a for i do loop:
local Players = game.Players:GetPlayers()
for i = 1, #Players do
local player = Players[i]
if player.Team then
print(player.Name .. " has a team.")
else
print(plauer.Name .. " doesn't have a team.")
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
so you want to check if all players arent on a certain team
yes
you could use a for i,v in pairs loop and use the variable to check if there on a certain team
but I want it to check if all players are not on a team AT ONCE
thats what it does ;-;
for _,v in pairs() do