Roblox Studio Tutorial – Creating Checkpoints

You can access the full course here: Intro to Roblox Game Making

Checkpoints

In this lesson, we’ll be taking a look at how to create checkpoints inside our Roblox game.

As of now, we have only one spawn location where the player starts from and get back to if they fall between obstacles. We might want to have multiple different span locations as checkpoints so once the player crosses them and dies, he’ll return to the last checkpoint saved.

We can add that to our game by going over to the Workspace (in the Explorer window),  clicking on the plus symbol next to it, and creating a new folder. Call it ‘Checkpoints‘ by renaming it on the Properties window:

Checkpoint Folder Stage1

Drag and drop the SpawnLocation into the newly created folder.

Rename the SpawnLocation part to ‘Stage1‘ in the Properties window.

Note: It’s important that you name the parts in your game exactly as seen in the lessons!

Now, scroll down in your Explorer window and click on the plus symbol next to the ‘Teams‘  folder to create a brand new Team:

Checkpoint Team Stage1

Rename it to ‘Stage1‘  too.

The way this works is that players are going to be put into a team when they reach a certain checkpoint. By default, every player starts off in the ‘Stage1‘ team. Basically, we’re tying the spawn location and each checkpoint to a specific team. This way, when the players of a certain team die, they will respawn at their team’s spawn point.

Connecting Teams to Checkpoint Parts

Select your Stage1 part (under the ‘Checkpoints‘ folder in the Explorer window) and in the Properties window set ‘TeamColor‘ to ‘Lime green‘:

Checkpoint Folder team connect

The ‘TeamColor’ property is an identifier for our team. So now Stage1 is identified by the lime green color.

Also, enable ‘AllowTeamChangeOnTouch‘ so that when players land on this spawn location their team will be changed. The ‘Neutral‘ property means that all players can spawn here, which we will leave enabled for our first stage.

Go to your ‘Stage1 team and match the lime green color for its ‘TeamColor‘ property:

Stage1 TeamColor

Now, the first stage of our game (the first spawn part) is assigned to the Stage1 team.

If we enter the Play mode by hitting F5, we’ll see the player is inside Stage1:

Stage1 Play

Creating More Checkpoints

To create a second checkpoint, let’s duplicate our Stage1 part by pressing Control + D (or Command + D if you’re on a Mac) and drag it to the other side of our starting point, after our last added obstacle:

Multiple Checkpoints

Rename it to Stage2. Set its ‘TeamColor‘ to ‘Really red‘ and untick ‘Neutral‘ as we do not want players spawning here by default:

Checkpoint Folder Stage2

Following, create a new team named Stage2 (make sure the names do match!) Change its ‘TeamColor‘ property to ‘Really red‘ too.

Checkpoint Team Stage2

If we play our game, we’ll see our second checkpoint has been added to the list and once we get there if we fall off the edge we’ll be back to Stage2 as expected:

Stage2 Play

As a challenge, try adding more obstacles now continuing from the second checkpoint we just included and then add another checkpoint (Stage3) at the other end:

Obstacles

Here we have our Stage3 (both part and team) with a brand new color:

Obstacle Stage3

Transcript

Welcome back, everyone. In this lesson, we are going to be looking at how we can create checkpoints inside of our Roblox game. So right now, we just have our one spawn point over here. And basically, when the player spawns here, they can do the obstacle course. If they do fall down to the void here, they will die, and then they’ll respawn on this spawn location right here.

But along our path, we might want multiple different spawn locations as checkpoints. So once the play gets to the end of this obstacle here, maybe there is a platform they can stand on and then continue, so if they die, they will respawn not back at the start here but moreover here where they last stood on a checkpoint. So, how do we do that?

Well, luckily for us, we can do that entirely without coding. That is all built into the engine here. So what we need to do first of all is I’m gonna go to our workspace, and I’m gonna create a brand new folder and call it Checkpoints.

So I’m gonna create the folder here, rename it to Checkpoints, and I’m gonna drag in our spawn location here. And what I’m gonna do is I’m gonna rename this spawn location. So I’m gonna go down to the properties, and I’m gonna find where we have Name, and I’m gonna call this Stage1.

Now, when I’m naming things from now on, it’s very important that you do name it the same thing as well, okay? Because the game identifies Stage1 by its name and its color, but we’ll get into that soon. So we’ve got our first stage right here. Then, what we want to do is we want to go down into where we have the Teams folder, okay?

We have Teams right here. And what we’re gonna do is click on a plus, and I’m going to create a brand new team, okay? You can see it’s got that little soccer ball icon right there. I’m gonna click on it and rename it to be Stage1. Now, the way this is gonna work is basically players are gonna be put into a team when they reach a certain checkpoint.

So by default, every player is going to be in this Stage1 team when they hit this first spawn point. And basically, what that means is we are tying a checkpoint or a spawn location to a specific team. So when the players of a certain team die, they will respawn at their team’s spawn point, which, in our case, is gonna be this one right here.

So how do we connect this team stage to the spawn point here? Well, first of all, let’s select our Stage1 right here. And what we want to do is go down in the Properties window here to where we have TeamColor, okay? And TeamColor is basically going to be an identifier for our team, for this first team, okay?

I’m gonna click on that, and I’m gonna make the first team. Let’s just make this the green color, so lime green. So basically, Stage1 is identified by the lime green color. Let’s also enable AllowTeamChangeOnTouch so when the players land on this spawn location, their team will be changed. And Neutral basically means that anyone can spawn here.

Now, for our first stage, we want this to be Neutral because we want all players to spawn here. So, enable Neutral. Then, down here in our Stage1 team, as you can see, we have our TeamColor again. And basically, we’ve just got to match this TeamColor with whatever the team color was on our Stage1 spawn location.

So click that, assign that to lime green. So now, this checkpoint right here is assigned to Stage1. And watch what happens when I press Play. Okay, I’ll press F5 and wait for that to load up. There we go. And now, as you can see here at the top-right corner, we have Stage1 highlighted. And you can see that I am basically inside Stage1.

Okay, there we go. So, Shift + F5 to stop playing the game. Now, let’s create our second checkpoint. So, how do we do that? Well, I’m gonna select our Stage1 right here, the part, Control + D or Command + D if you’re on a Mac, and I’m gonna move this over here, okay? Maybe move it down a bit as well so it’s in line with the obstacle course.

There we go. So, we’ve got our second stage. So, what do we need to do? Well, I’m gonna go down to where we have the name, and I’m gonna rename it to Stage2. I’m gonna go down to where we have our Teams dropdown. I’m going to disable Neutral, since we don’t want players spawning here by default, and I’m gonna change the TeamColor to a brand new color.

So let’s say I’m gonna change it to really red. So then, what we can do is go down to our Teams. I’m going to create a new team here. I’m gonna call this team, Stage2. Make sure the names do match. And I’m gonna change the TeamColor, of course, to really red. So, save that.

Now what happens is that if I press Play, so we play the game here. If I reach the end stage, as you can see, it’s added to the list here. So what I can do is, let’s complete this obstacle course right here. And as you can see now, my name has moved up to Stage2 right here. So what happens is that when I fall off the edge, I’m not gonna respawn back at the initial checkpoint.

Instead, I’m gonna respawn at the last checkpoint that I stood on, which was Stage2. And as you can see, here I am next to the yellow cylinder, which means I am at the end, and then I can continue on with the further obstacles. So that is how we can set up our stages right here.

And what I want you to do now is, as a bit of a challenge, I want you to go ahead, I want you to add in some more obstacles, so maybe let’s go off to the right or something, and then I want you to add another checkpoint at the end.

So basically, I want you to add in, let’s just say five or so obstacles for the player to jump over and across, and then add in a brand new checkpoint, Stage3 at the other end. So I’ll be right back to see how you done. And there we go. So I’ve added in my obstacles right here, I’ve added in a little cylinder that the player can jump around, and then I’ve added in the third stage.

Now, Stage3, I’ve basically called this object Stage3, and I’ve assigned the color down here of toothpaste. I’ve also created a Stage3 team in the Teams folder called Stage3, and also given it the color toothpaste. Let’s also put these new parts into our Obstacle Parts folder as well to organize it like so.

And if we press Play, we should see that we have the new team added on the top right-hand side. There we go, Stage3. So from here, you can pretty much add in more obstacles as you wish, add in more checkpoints, and pretty much keep going along with creating your obstacle course, okay?

Checkpoints are going to be a very useful thing in your obstacle course game, as players won’t really enjoy it that much if they’re jumping on platforms for five minutes, they fall, and then have to go back to the start. So make sure to add in checkpoints along the way. Thank you for watching.

Interested in continuing?  Check out our all-access plan which includes 250+ courses, guided curriculums, new courses monthly, access to expert course mentors, and more!