| |
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 29 May 2012 06:26 PM |
Sure.
Loop through the Players service and count the number of people on a team.
function CountOnTeam(TeamColor) local Count = 0 for Index, Player in pairs(game.Players:GetPlayers()) do if Player.TeamColor == TeamColor then Count = Count + 1 end end return Count end
if CountOnTeam(BrickColor.new("Really red")) > 5 then --Do stuff. end
|
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 29 May 2012 06:52 PM |
| Imo, an easier way to do it is to use the PlayerAdded or ChildAdded event to check if that breeches the max number you want. |
|
|
| Report Abuse |
|
|
| |
|