An obstacle course with lava, checkpoints, a disappearing platform and a finish line.
Free45 minutes · Beginner · Roblox Studio
1
Step 1 / 10
Create a new place
Open Roblox Studio and sign in.
Click New Experience and choose the Baseplate template.
You now have a flat grey floor. Your course will stand on it.
More detail
Roblox Studio is a free program for Windows and Mac. If it is not installed yet, download it from create.roblox.com and sign in with your Roblox account.
The Baseplate template is in the list of templates on the start screen. It is the one that shows an empty grey floor.
The place opens in a tab. The name of the tab is the name of your place.
On a Mac, use the Cmd key every time this guide says Ctrl.
Tip. Save often with File → Save to Roblox. Studio keeps older versions, so you can always go back.
This step does not work for me
Check these three things first
The name of every part and script is exactly as in the guide, with the same capital letters.
The script sits inside the right object. Look at the label above the code box.
Open the Output window from the Window menu. Red text shows the script and the line with the problem.
Select Start and press Ctrl+D to duplicate it. Pull the copy forward with the Move tool (Ctrl+2).
Make it smaller with the Scale tool (Ctrl+3). A size of 6, 1, 6 works well.
Leave a gap of 5 to 7 studs between platforms. Repeat until you have 6 to 8 platforms.
Raise some platforms a little so the course climbs.
More detail
The copy appears exactly on top of the original, so it looks as if nothing happened. Drag the blue or red arrow of the Move tool and the copy slides out.
With the Scale tool, drag one of the small balls on the part to change its size. You can also type the size into Properties.
The Position field in Properties shows where a part is. Compare the numbers of two platforms to measure the gap between them.
Every platform must be Anchored. Copies of an anchored part are anchored too, so check this only for parts you created new.
Press F5 to try the jumps yourself and Shift+F5 to stop. Do this after every two or three platforms.
Tip. A default character jumps 7.2 studs high and clears about 8 studs forward. Gaps above 8 studs are almost impossible.
This step does not work for me
Check these three things first
The name of every part and script is exactly as in the guide, with the same capital letters.
The script sits inside the right object. Look at the label above the code box.
Open the Output window from the Window menu. Red text shows the script and the line with the problem.
Add a new Part between two platforms. Make it red, set Material to Neon, turn on Anchored and name it Lava.
In Explorer hover over Lava, click the + button and choose Script.
Delete the line that is already there and paste this code.
Lava > Script
local lava = script.Parent
lava.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.Health = 0
end
end)
What each part does
script.Parent is the part the script sits in. Here that is the lava.
Touched runs every time something touches the part. hit is the thing that touched it, for example a foot.
hit.Parent is the whole character. If it has a Humanoid, it is a player, so the script sets Health to 0.
More detail
Material is a list in Properties. Click it and choose Neon. Neon makes the part glow.
When you add the Script, it opens in a new tab with one line of code in it. Click inside the code, press Ctrl+A to select everything and Ctrl+V to paste over it.
Go back to your world by clicking the tab with the name of your place.
To test: press F5 and walk into the lava. Your character falls apart and comes back at the start.
Make the lava wide and flat, for example Size 12, 1, 6, and put it a little lower than the platforms, so a missed jump lands in it.
This step does not work for me
Check these three things first
The name of every part and script is exactly as in the guide, with the same capital letters.
The script sits inside the right object. Look at the label above the code box.
Open the Output window from the Window menu. Red text shows the script and the line with the problem.
In Explorer hover over Workspace, click + and add a Folder. Name it Checkpoints.
Place three anchored parts along the course and drag them into the folder. Name them 1, 2 and 3. Part 1 goes on the start platform.
Hover over ServerScriptService, click + and add a Script. Paste this code.
ServerScriptService > Script
local Players = game:GetService("Players")
local checkpoints = workspace:WaitForChild("Checkpoints")
Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
stats.Parent = player
local stage = Instance.new("IntValue")
stage.Name = "Stage"
stage.Value = 1
stage.Parent = stats
player.CharacterAdded:Connect(function(character)
local root = character:WaitForChild("HumanoidRootPart")
local point = checkpoints:FindFirstChild(tostring(stage.Value))
if point then
task.wait(0.1)
root.CFrame = point.CFrame + Vector3.new(0, 4, 0)
end
end)
end)
for _, point in ipairs(checkpoints:GetChildren()) do
point.Touched:Connect(function(hit)
local player = Players:GetPlayerFromCharacter(hit.Parent)
local stats = player and player:FindFirstChild("leaderstats")
if not stats then return end
local number = tonumber(point.Name)
if number == stats.Stage.Value + 1 then
stats.Stage.Value = number
end
end)
end
What each part does
leaderstats is a special folder name. Values inside it appear in the player list, so everyone sees their Stage.
When a character spawns, the script moves it to the checkpoint whose name equals the player's Stage.
Touching a checkpoint raises Stage only if it is the next one. That stops players from skipping ahead.
More detail
A Folder holds other objects, like a folder on a computer. It does nothing in the game by itself.
To drag a part into the folder, drag its name in Explorer onto the name Checkpoints and let go. The part then sits one step to the right, under the folder.
Make the checkpoint parts thin and wide, for example Size 6, 0.4, 6, and lay them on top of platforms. A different color helps players notice them.
To test: press F5 and look at the player list in the top right corner. It shows Stage 1. Touch checkpoint 2 and it changes to 2.
The checkpoints must be touched in order. Touching 3 before 2 does nothing.
Common mistake. Naming the parts Checkpoint1 or One. The script looks for the exact names 1, 2 and 3.
This step does not work for me
Check these three things first
The name of every part and script is exactly as in the guide, with the same capital letters.
The script sits inside the right object. Look at the label above the code box.
Open the Output window from the Window menu. Red text shows the script and the line with the problem.
Put a big anchored part at the end and name it Finish. Make it gold so players see the goal.
Add a Script to Finish and paste this code.
Finish > Script
local Players = game:GetService("Players")
local finish = script.Parent
local cooldown = {}
finish.Touched:Connect(function(hit)
local player = Players:GetPlayerFromCharacter(hit.Parent)
local stats = player and player:FindFirstChild("leaderstats")
if not stats or cooldown[player] then return end
cooldown[player] = true
stats.Stage.Value = 1
player:LoadCharacter()
task.wait(2)
cooldown[player] = nil
end)
What each part does
GetPlayerFromCharacter finds which player touched the finish.
The cooldown table stops the code from running many times in the same second.
Stage goes back to 1 and LoadCharacter sends the player to the start for another run.
More detail
To make it gold, click the Color field in Properties and pick a yellow. Material Neon makes it shine.
Size 12, 1, 12 is a good finish. Put it after the last jump, a little higher than the rest.
To test: press F5, finish the course and step on the gold part. You come back at the start and Stage shows 1 again.
The 2 second cooldown is there because one step touches the part many times.
This step does not work for me
Check these three things first
The name of every part and script is exactly as in the guide, with the same capital letters.
The script sits inside the right object. Look at the label above the code box.
Open the Output window from the Window menu. Red text shows the script and the line with the problem.
Press F5 to play. Run the whole course from start to finish.
Fall into the lava on purpose. You should come back at your last checkpoint.
Press Shift+F5 to stop.
Open the Output window from the Window menu. Red text means a script has an error, and it shows the line number.
More detail
F5 starts the game with your character in it. The toolbar changes while the game runs.
Changes you make while the game is running are lost when you stop. Always press Shift+F5 first, then edit.
In the Output window, click a red line and Studio opens the script at the line with the error.
Check three things when something does not work: the part's name, where the script sits, and whether Anchored is on.
Common mistake. A platform falls when the game starts: Anchored is off. Nothing happens when you touch a part: the script is in the wrong object, or a name has a typo.
This step does not work for me
Check these three things first
The name of every part and script is exactly as in the guide, with the same capital letters.
The script sits inside the right object. Look at the label above the code box.
Open the Output window from the Window menu. Red text shows the script and the line with the problem.