Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I randomize players between 3 teams, while there being no chance of no players on 1 team?

Asked by 10 years ago

So, I want to randomize players between 3 teams based on a percentage. Green Team: 70% chance Red Team: 20% chance Blue Team: 10% chance

I currently have a math.random setup, randomizing players based on those percentages, but that means that there is always a chance that no players will spawn on 1 team. How can I set it up so that at least 1 player always spawns on each team?

You don't have to provide code if you don't want to, but only explain your theory. Thanks!

1 answer

Log in to vote
-1
Answered by
Spooce 78
10 years ago

Set the AutoAssignable property of Team to true, I think that works for this situation. It might not work, just giving a suggestion.

0
I'm not actually inserting teams though, so that players cannot know what team other players are on. SlickPwner 534 — 10y
0
Oh. Spooce 78 — 10y
Ad

Answer this question