PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Using Player Spawns

Using Player Spawns

Aug 02 2018, 6:25 PM PST 5 min

Spawns are used to position a character when they start the game or re-spawn. Characters will still spawn if there are no SpawnLocation objects in the place, but they’ll just drop into the center.

Inserting a Spawn

To insert a spawn in Roblox Studio:

  1. In the Explorer window, hover your mouse over Workspace.
  2. Click the circle button.
  1. Scroll through the drop-down list until you find SpawnLocation and click on it. This will insert a completely functional spawn.

Neutral Spawns

A neutral spawn is a spawn location where anybody can spawn, regardless of their team. In most cases a neutral spawn is used in the in games that have no teams, but can always be used. To make a spawn neutral, all you need to do is open up the SpawnLocation’s properties and make sure the SpawnLocation/Neutral property is true.

Team Spawns

Team spawns require not only a SpawnLocation, but also a Team object. Insert one of these the same as you insert a spawn, Insert > Object > Team.

You will need to make sure the team is a child of the Teams in order for it to work properly. Setting up the team is simple.

The first thing you’ll want to do with your new team, is set the name of it. The name can be anything you want, the part that matters is the Team/TeamColor property.

Find the TeamColor property in the team, and set it to whatever color you want, but keep in mind you can only have 1 team per color.

If you want players to be able to automatically be on that team at the beginning of the game, set the Team/AutoAssignable property to true.

Now that you have your Team, you need to match the SpawnLocation to it. Do this by finding the SpawnLocation/TeamColor property, and setting it to the same color as the Team/TeamColor property. Keep in mind the Articles/BrickColor Codes of the spawn does not influence the spawn’s behavior.

Changing Teams

Allowing players to change teams is simple, just set the SpawnLocation/AllowTeamChangeOnTouch property to true.

Making Checkpoints

SpawnLocation|SpawnLocations are often used to make checkpoints in obstacle courses or similar games. To achieve this:

  1. Create a SpawnLocation corresponding to a different Team for each checkpoint.
  2. Set SpawnLocation/AllowTeamChangeOnTouch|AllowTeamChangeOnTouch for each checkpoint.

When a player touches the spawn location, their team will be changed. If their character dies, they’ll re-spawn at that location, since each team only has one assigned SpawnLocation.