I'm making a game and I'm trying to split the players up into teams.
Only thing is, I don't know what you would do to have them switch teams in the script.
Help, please.
I'm making a game and I'm trying to split the players up into teams.
Only thing is, I don't know what you would do to have them switch teams in the script.
Help, please.
Players are identified into their teams by the TeamColor property in the Player object. This value is a BrickColor value.
To switch a player to a Team, change the Player's TeamColor property to the same color as a Team.
Here's an example:
game.Players.Kenetec.TeamColor = game.Teams.SomeTeamName.TeamColor
To further help with your question, to split all players into two teams, you should assign a variable to a table of Players, randomize it if needed, and then split the table into two tables down the middle. Then iterate through each table and put the Players into their respective teams.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
The last paragraph is gibberish to someone who doesn't know how to change a player's team. Elaborate. Can you be more specific?