Player Spawns and Teams
Player Spawns and Teams
SpawnLocation objects are used to position player characters when they start the game or respawn. They can also be used to spawn players of different teams at specific locations.
Inserting a Spawn
To insert a spawn in Studio, select the Model tab and click the Spawn button:
Hiding the Spawn Block
If desired, you can “hide” the
SpawnLocation object as follows:
- Make it invisible by setting its Transparency property to 1.
- Turn off its CanCollide property so players don't appear to be standing on nothing.
- Delete its child Decal object.
Disabling the Force Field
By default, characters will spawn with a 10-second
ForceField which protects them from basic “spawn killing.” However, the built-in protection is limited to
Explosion|Explosions and damage dealt via
Humanoid/TakeDamage|Humanoid:TakeDamage(), not by scripts that reduce
To disable the force field completely, set the spawn’s Forcefield → Duration property to 0.
Teams service adds team functionality and is closely tied to player spawns. Team names and colors, along with all the players on that team, are visible on the in-game
Adding the Teams Service
Teams service isn’t included in a game by default, so you must add it.
- With the Model tab still selected, click the Service button () in the Advanced section.
- Select Teams and click Insert. When complete, the Explorer will get a new object called Teams.
Adding New Teams
Teams service added, you can create a new team by hovering over the Teams object, clicking the icon, and selecting Team.
Once the team has been added:
- Change the team’s Name to a suitable value.
- Assign the team a unique TeamColor, a setting which works in direct conjunction with
articles/Leaderboards|leaderboard, so set them accordingly. In this example, "Blue Team" is assigned the logical team color of "Really blue."
By default, spawn locations are neutral, meaning any player can spawn upon them. In most games, however, teams should be separated by distinct “territories” or a physical barrier like a
articles/Collision Filtering Team Doors|team door.
To lock a spawn location to a specific team:
- Select the
- In the Properties window, disable its Neutral property.
- Set its TeamColor property to the color of the associated team you created above.
By default, Roblox will auto-assign new players to the team with the fewest players. To assign players to a specific team and spawn location which you’ve configured:
- Select each
Teamobject in the Teams service and disable its
- Assign a player to a specific team by changing their
Player/Teamproperty to the team name, for instance
Teams["Blue Team"]. This can be done in various ways, for instance a team selection GUI as exhibited in the Team Picker sample below, or a lobby with different
articles/How to teleport within a Place|teleportersthat assign players to teams.