Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
Implement teams
You can divide players in your game into multiple teams using the Teams service. By configuring the Teams service and assigning teams, players are automatically differentiated by their display name color, as well as their name in the default player list.
Add teams
By default, no teams are configured. To add teams:
In the Explorer hierarchy, hover over the
Teamsobject and click the ⊕ icon to show a list of objects.Insert a new
Teamobject under theTeamsservice.
Select the new
Teamobject and, in the Properties window, change the teamNameand assign a unique matchingTeamColor. A team's name and color both appear in the game's player list.
Repeat these steps to add more teams.
Assign players to teams
By default, Roblox auto-assigns new players joining the game to the team with the fewest members, and you can still use the following steps to assign players to a specific team.
Select each
Teamobject in theTeamsservice to display its properties.Uncheck the
AutoAssignablecheckbox.
Assign a player to a specific team by changing their
Player.Teamproperty to the team name in the format ofTeams[TEAM_NAME], such asTeams["Blue Team"].
Team spawn locations
You can use SpawnLocation objects to spawn players of different teams at specific locations when they join or respawn. By default, SpawnLocations are neutral and any player can spawn upon them, so you need to lock each one to the team that can occupy it using the following steps:
Using the Explorer, insert a new
SpawnLocationinto the workspace.With the new
SpawnLocationselected, uncheck itsNeutralcheckbox in the Properties window.Set the spawn's
TeamColorproperty to theTeamColorof an existing team. For example, if the intended team'sTeam.TeamColorisLapis, set the spawn'sSpawnLocation.TeamColortoLapisas well.
<img src="https://prod.docsiteassets.roblox.com/assets/studio/properties/SpawnLocation-TeamColor.png" width="320" /> Note
Note that the SpawnLocation.TeamColor property is different from SpawnLocation.BrickColor and SpawnLocation.Color which represent the visual color of the spawn object and are not related to team functionality.