Teams¶
The Teams service holds a game's Team objects. Team objects must be parented to the Teams service.
Description¶
The Teams service holds a game's Team objects. Team objects must be parented to the Teams service.
Teams offer a range of features that are useful to developers. These can broadly be divided into features that work out-of-the-box and features developers can program into their game.
Built-in team behavior The following functionality of Teams exists by default and does not require the developer to program any custom behavior.
- When part of a Team, the name above a player's character Model will be colored to the Team.TeamColor
- Changing Player.TeamColor will cause Player.Team switch to the Team with the corresponding Team.TeamColor
- When using the default player list users will be grouped and displayed by team
- Setting Player.Neutral to true will cause the Player to be dis-associated with the team, but will not change Player.Team or Player.TeamColor
- When a Player joins a game, they will be allocated to the team with Team.AutoAssignable set to true that has the fewest players. If no auto assignable team is available, Player.Neutral will be set to true
- When SpawnLocation.Neutral is set to false, only players whose Player.TeamColor matches SpawnLocation.TeamColor can spawn on that SpawnLocation
- When SpawnLocation.AllowTeamChangeOnTouch is set to true, a player's Player.TeamColor will change to SpawnLocation.TeamColor when their character touches the SpawnLocation
Optional extended team behavior Many developers chose to add the following features to teams in their own code.
- Implement checks for team in weapon code to prevent team killing
- Implement doors or other features that only certain teams can use
- Periodically reassign teams to maintain team balance
Inheritance¶
Nova inheritance: Instance → Teams
Methods¶
GetTeams Supported Function Returns a table containing the game's Team objects. Will only return Team objects that are parented to the Teams service.
Returns a table containing the game's Team objects. Will only return Team objects that are parented to the Teams service.
The GetTeam function returns a table containing the game's Team objects.
Note this will only return Team objects that are directly parented to the Teams service. For this reason it is recommended developers only parent Team objects to the Teams service and not to other Instances (or to each other).
RebalanceTeams Supported Function Deprecated Evens the number of people on each team. This function does not work correctly and should not be used.
Evens the number of people on each team. This function does not work correctly and should not be used.
Inherited members¶
Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.
Roblox reference: Teams
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.