Roblox Heist: Build a Level

Step 1
In this lesson you will be building a Map for your players to explore

I will be providing some direction, but don't just copy me! Make your own obstacles and platform

Step 2
Create some obstacles for the player to get around

Here I have a section the player must carefully jump across

Step 3
Include sliding doors from the previous lesson

Your doors don't have to look like mine! They don't even need to be made of glass!

Step 4
Include coins for the player to collect

Maybe your player is collecting something besides coins

Step 5
Before moving on to the next lesson, we're going to take the time here to create a RestartLevel Script

Right now if a player explodes a bomb and comes back, the bomb is still gone...

Similarly, Doors remain open, Coins remain collected, etc

Step 6
We're going to make a folder to hold every object that we want to respawn when the player dies

Name this folder Respawn


You may notice I put all of the permanent objects such as walls and floors into a folder as well.

Step 7
Drag and drop all objects that need to "reset" once the player dies

These objects includes things such as

  • Doors need to close
  • Coins need to reappear
  • Bombs needs to un-explode!
Check Your Work
Step 8
You should now have two sets of organization for your levels, objects that reset, and objects that are permanent

(You do not need a Walls folder like I have)

Step 9
We're going to make a Script to restore the objects in the Respawn folder when the player dies

First we Duplicate the Respawn folder when the game starts


When the player dies we Destroy the Respawn folder


Finally we put the duplicate of the Duplicate and put it back in the Workspace

Step 10
Go to the StarterPlayerScripts folder and add a new local script, "Reset"

All players will automatically start with this Script attached to them

Step 11
Start the Script by referencing the player

The Player can be found by getting the Script's Parent's Parent

Step 12
Make a Clone of the "Respawn" folder and store it in "ReplicatedStorage"

WaitForChild() means the script will wait until the "Respawn" folder loads before we duplicate it.

Step 13
Add a function named Reset
Step 14
When this function is called it Destroys everything inside of "Respawn", then duplicates our saved mapData

In order to see the mapData clone, we need to parent it to the Workspace

Step 15
In order to check if the player has died, we need to refer to the "player object" in the Workspace (red)

Our player variable refers to the player data

We need to make another variable for the Workspace's player

Step 16
Make a variable for the Workspace's player object, then connect it's death event to the reset function

The death event is named CharacterRemoving.

Check Your Work
Step 17
Now when the player dies, everything inside the "Respawn" folder will come back
Step 18
Include an area to hold a treasure the player is going to try to steal

In the next lesson we will be making this treasure for the player to try to steal

Roblox Heist: Build a Level Info


MVCode Clubs

Created By

Newprofile jamie


Roblox Heist Game

Access Level


For Teachers and Schools

Teach coding to your students with MVCode Teach

MVCode offers an integrated product designed to teach coding to students.

Learn more about MVCode Teach