Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to detect a certain number of players in a team?

I'm working on a fighting game and it's going good so far, but i was thinking about how it would be unfair if all the players were on the same team. I want to make a script that will not let anyone change to a team if it has a certain number of players, but I don't know how to get the number. I could try

team:GetPlayers()

but I don't know how to get the amount of players. How would I do that?

1 answer

✓ Accepted answer
#team:GetPlayers()

You put a hashtag and that will give you the number of things in a table. In this case, players on the team.

This discussion is preserved as it was. New answers, comments, and votes are closed.