What I'm trying to do is make a new team for every player that enters and have that team's name be the Player's name with a random TeamColor.
I can use BrickColor.Random() to find a random color for the Team, but how do I ensure (and still end up with a new team) that no two teams have the same color?
1 | local color 1 = BrickColor.Random() |
2 | Team 1. TeamColor = color 1 |
3 |
4 | local color 2 = BrickColor.Random() |
5 | while color 2 = = color 1 do |
6 | color 2 = BrickColor.Random() |
7 | end |
8 |
9 | Team 2. TeamColor = color 2 |