Skip to content

Teams

Supported Class Services NotCreatable Service

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.

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

Object → Instance → Teams

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.
Teams:GetTeams(): Objects

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).

Roblox reference signature
Teams:GetTeams(): Instances

Roblox documentation

RebalanceTeams Supported Function Deprecated Evens the number of people on each team. This function does not work correctly and should not be used.
Teams:RebalanceTeams()

Evens the number of people on each team. This function does not work correctly and should not be used.

Roblox reference signature
Teams:RebalanceTeams(): null
Nova behaviour: Nova keeps this legacy member for compatibility. Roblox's modern deprecation wording may describe later Roblox behaviour; verify it against Nova before relying on the copied text.

Roblox documentation

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.