Skip to content

Service · inherits Instance

Teams

Official docs ↗

The Teams service holds a game's Team objects. Team objects must be parented to the Teams service.

About Teams

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

Methods 1

  • GetTeams() → List<Team>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).

Teams also has every member of Instance. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.