for _,v in pairs(game.Players:GetPlayers()) do
if v.TeamColor == BrickColor.new("Bright blue") then
blueteam.Value = blueteam.Value + 1
elseif v.TeamColor == BrickColor.new("Bright red") then
redteam.Value = redteam.Value + 1
end
end
I am trying to make it so it checks the amount of players on a team, so it would say print 5, being 5 people are on red team.

3 comments
This is correct, assuming redteam and blueteam are defined. Make sure you remember to reset the values between tests, though.
yeah it works, but when there is 2 players, it says 1 for blue value and 2 for red, even though theres only 1 for each team?
how can I get it to just count the players so if theres 8 people it says 4 blue 4 red