How to use Spawns

From Legacy Roblox Wiki
Jump to navigationJump to search

Introduction

Believe it or not, using spawns is one of the largest problems many new builders have. In this article we will dive into Spawns, and learn how to use them together.

Spawns are used to position a character when they respawn. Characters will still respawn if there are no spawn points on the map, but they will just drop into the center. You can see why we would want to avoid this in a nice game of Capture the flag or an obby!

Inserting a Spawn

To insert a spawn in Roblox Studio, we will simply click 'Insert' from top menu, and select Object. In the box that pops up, find SpawnLocation and click ok. This will insert a boring looking brick, but it's a completely functional spawn.

Alternatively if you have the ToolBox open, you can open Game Objects and there are 4 different pre-configured team spawns, and a Neutral Spawn. These will probably be the Spawn Locations you're used to seeing around Robloxia.

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 Neutral property is true.

Team Spawns

Team spawns require not only the 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 Service 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 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 AutoAssignable property to true.

Now that you have your Team, you need to match the SpawnLocation to it. Do this by finding the TeamColor property of the SpawnLocation, and setting it to the same color as the TeamColor property in the team. Keep in mind the BrickColor, or appearance, of the spawn has nothing to how it works.

Changing Teams

Allowing players to change teams is simple, just open up the SpawnLocation's properties and set the AllowTeamChangeOnTouch property to true.

Making Checkpoints

Adding Checkpoints to your game is easy. Some cases where you might want checkpoints would be an Obby, 'Climb the stairs', or other similar game varieties.

A checkpoint is just a SpawnLocation that allows Team Changing, and a matching Team. In most cases, you won't want the team to be AutoAssignable. Be sure to check that to make sure it's set up the way you want it.

For each Checkpoint you want, just add another SpawnLocation and another Team. Remember to match the TeamColor on the Spawn and Team so it will work!