BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 24 Nov 2015 03:04 PM |
I know how to do this:
b=true for i,v in pairs(game.Players:GetPlayers()) do b=not b if b==true then v.TeamColor=BrickColor.new("Really red") else v.TeamColor=BrickColor.new("Really blue") end end
but then the teams become repetitive. How do i mix it up? |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2015 03:09 PM |
| Use math.random(1,2) to randomize the teams. |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 24 Nov 2015 03:14 PM |
| yeah but then they could be unbalanced |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|
|
| 24 Nov 2015 03:31 PM |
try dividing the # of players by # of teams and then doing math.random until its uneven, then add all of the remaining players to the team with less players?
|
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 25 Nov 2015 09:39 AM |
Still need help.
Also, if you have the chance, try out my new game BLOXBALL! |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 09:50 AM |
do something like math.random and also add a conditional statement such that if a team's max players is eg.6 then it can be such that it checks if the teams has less than six then adds the player in else if it has 6 then it automatically adds the player to the other team.
|
|
|
| Report Abuse |
|
|
64kingJOE
|
  |
| Joined: 16 Jan 2016 |
| Total Posts: 7078 |
|
|
| 25 Nov 2015 11:38 AM |
| can't you just use autoassignable? |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 25 Nov 2015 01:43 PM |
| I think teams will be more random with my new method thanks anyways! |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 26 Nov 2015 01:02 PM |
| I'm all good. Thanks guys! |
|
|
| Report Abuse |
|
|