If you make a long obby, it’s frustrating for players to get nearly to the end and then fall, losing all their progress. Having multiple spawn locations as checkpoints lets the player respawn, or restart, after reaching certain parts of your game. You may have seen this in games like Super Mario.
Spawn locations are good in the following situations:
- Before or after a difficult jump.
- After players have played for a short period of time.
Discussion Topic - Spawn Locations »
Ask students why having multiple spawn locations improves a player's experience. This is an opportunity to discuss good design practices and encourage students to think about how they can affect a player's experience.
- Players feel a sense of accomplishment when they reach a checkpoint which keeps them playing.
- It gives players a sense of progression (like they're growing or improving).
Setting up the Checkpoint System
Each player has a certain SpawnLocation assigned to them. Every time the player touches a new spawn, the new location replaces their old one. If they fall, they will respawn on the last spawn location they touched.
Add the Team Service
You can use a tool called Team Service to create multiple spawn locations. Each team has a unique spawn location assigned to it. When a player changes a team, they change their spawn location.
- Select the Model tab.
- In the Advanced section (furthest right), click Service (two cogs).
- Select Teams.
- Click Insert.
- Check that you have a Teams folder in the Explorer.
Add a Team
With the Team service added, you can create teams. Remember, each team that you create will actually be a different spawn location (checkpoint) in your obby. As the player goes through our game, they’ll be switching teams to switch their most recent spawn location.
- In the Explorer, right-click Teams.
- Click Insert Object > Team. A new team will be created in the Teams folder.
If Team doesn't show up, try restarting the steps. It's possible to accidentally right click the wrong object or not insert the Team service.
Rename the Team
Rather than having a team name, we want an area name. The name should match the theme of your game. Below are some examples names:
- Unicorn Valley
- Village Area
- Beginner’s Dojo
Do the following to rename the team:
- Right-click Team.
- Select Rename.
- Add a descriptive name.
Modifying Team Spawns
At the moment, any team can use the original SpawnLocation. While this sounds like a good thing, a player on your 15th spawn location might accidentally respawn at the beginning of the whole game.
Set Team Properties
To fix this possible problem, we need to change the team properties.
- Click on your starting SpawnLocation.
- In the Properties window, uncheck Neutral.
Assign Team to the first SpawnLocation
For a team and a SpawnLocation to match up, the Team Color and SpawnLocation need to match exactly.
- In SpawnLocation Property Window, look for the TeamColor; you’ll need to remember this color.
- Click on the Team object you renamed.
- Set the TeamColor to match the first SpawnLocation.
- Test your game.
If the SpawnLocation is not working, check the following:
- Make sure to replace the TeamColor, not the BrickColor of the SpawnLocation.
- Make sure that the colors match exactly.
Adding More Spawn Locations
Now you can start the process of adding more spawn locations to give your player a longer, more interesting experience.
Setup the SpawnLocation
- Create a new SpawnLocation.
- Rename the SpawnLocation SpawnLocation2.
- Check AllowTeamChangeOnTouch. Now whenever somebody touches the SpawnLocation, they’ll join the matching team color.
- Uncheck Neutral.
- Pick a new TeamColor.
Setup the Team Object
- Create a new Team Object (right-click Teams > Insert Object > Team).
- Rename it to your area name. E.g. Goat Mountain.
Change Team Properties
- Uncheck AutoAssignable.
- Change TeamColor to match the new SpawnLocation.
Continue your Project
- Add at least 3 new spawn locations.
- Test after adding each point to check that it works as intended.
You can add many spawn locations, just be sure to:
- Rename each one to something different (for example, SpawnLocation2, SpawnLocation3 …)
- Use a different team color for each spawn location/team object.
Issue: Sometimes the player spawns on the wrong location Check to make sure all the following are true:
- Only the first team is set to AutoAssign.
- The SpawnLocation is marked neutral.
- The color matches on the SpawnLocation TeamColor and the Team object TeamColor.
These documents are licensed by Roblox Corporation under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Roblox, Powering Imagination, and Robux are trademarks of Roblox Corporation, registered in the United States and other countries.
Previous Colors and Materials Next Publish and Playtest