Cvear
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 4426 |
|
|
| 25 Jul 2015 01:44 PM |
I want 1 player assigned to each team so there are no 2 player teams
|
|
|
| Report Abuse |
|
|
AkaLua
|
  |
| Joined: 27 Jul 2012 |
| Total Posts: 526 |
|
| |
|
|
| 25 Jul 2015 01:46 PM |
| are you creating teams as players enter the server or is there a preset number of teams |
|
|
| Report Abuse |
|
|
Cvear
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 4426 |
|
| |
|
Cvear
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 4426 |
|
|
| 25 Jul 2015 01:47 PM |
| Preset number of teams and I want 1 player in each one. |
|
|
| Report Abuse |
|
|
AkaLua
|
  |
| Joined: 27 Jul 2012 |
| Total Posts: 526 |
|
|
| 25 Jul 2015 02:10 PM |
local teams = game.Teams:GetChildren() local team = 1 for i,v in pairs(game.Players:GetChildren()) do v.TeamColor = BrickColor.new(teams[team].TeamColor) team = team+1 end |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2015 02:11 PM |
Oh, I think you can simply instance a team every time a player, set its `AutoAssignable` property to false, and set the player's TeamColor property equal to that of the team's.
**You should probably also make sure to remove said team after the player leaves. |
|
|
| Report Abuse |
|
|