Creating Checkpoints

Creating Checkpoints

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.

Spawn locations are good in the following situations:

  • Before or after a difficult jump.
  • After players have played for a short period of time.
    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.

  1. Select the Model tab.
  2. In the Advanced section (furthest right), click Service (two cogs).
  1. Select Teams.
  2. Click Insert.
  1. 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.

  1. In the Explorer, right-click Teams.
  2. Click Insert Object > Team. A new team will be created in the Teams folder.

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:

  1. Right-click Team.
  2. Select Rename.
  1. 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.

  1. Click on your starting SpawnLocation.
  2. In the Properties window, uncheck Neutral.
Now players can only spawn at this SpawnLocation if they match the TeamColor of the SpawnLocation. This will prevent any possible problems we might have in our game.

Assign Team to the first SpawnLocation

For a team and a SpawnLocation to match up, the Team Color and SpawnLocation need to match exactly.

  1. In SpawnLocation Property Window, look for the TeamColor; you’ll need to remember this color.
  2. Click on the Team object you renamed.
  3. Set the TeamColor to match the first SpawnLocation.
  4. Test your game.

If the SpawnLocation is not working, check the following:

  • Make sure to replace the TeamColor, not the BrickColor of the SpawnLocation.
  • Check 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

  1. Create a new SpawnLocation.
  2. Rename the SpawnLocation SpawnLocation2.
  3. Check AllowTeamChangeOnTouch. Now whenever somebody touches the SpawnLocation, they’ll join the matching team color.
  4. Uncheck Neutral.
  5. Pick a new TeamColor.

Setup the Team Object

  1. Create a new Team Object (right-click Teams > Insert Object > Team).
  2. Rename it to your area name. E.g. Goat Mountain.

Change Team Properties

  1. Uncheck AutoAssignable.
  2. Change TeamColor to match the new SpawnLocation.
Only the first Team should be set to AutoAssignable. That way players will automatically be assigned to the first checkpoint when they start the game.

Continue your Project

  1. Add at least 3 new spawn locations.
  2. 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.

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 Themes and Colors Next Creating a Script