# Making a team ratio system

I am wondering if it is possible to make a team ratio system. For example if I want a team ratio of 2 cops to 1 robber would that be possible. If it is possible how would I make it?

You would need to detect how many players are in each team, then change those players’ teams according to the ratio you want.

• Get number of players
• Divide by 3
• Set one variable to that number
• Set a different variable to double that number
• Assign random players to each team until one team reaches their variable, at which point everyone else should be dumped into the other team

I would like them to be able to pick their team, though.

@Dasher89798 i want them to be able to choose their team.

You’d use guis then. You can register the team that the player wants to select and according to the fixed ratio, check if the player is eligible to fit in the team. Simple math here. You want a ratio of 2:1. If ‘x’ is the number of players in the server that means team 1 will have 2x/3 and the other one x/3. Now just place them in teams.

could you go into depth that was kinda confusing

What out of all of that do you have a doubt in?