← All guides
Guide 1

Build your first obby

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

  1. Open Roblox Studio and sign in.
  2. Click New Experience and choose the Baseplate template.
  3. 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.

Still stuck? Write to us →

2
Step 2 / 10

Learn the three panels

  1. The big 3D view in the middle is the Viewport. This is your game world.
  2. Explorer lists every object in the game. Properties shows the settings of the object you selected.
  3. Move the camera: hold the right mouse button to look around, fly with W A S D, go down and up with Q and E.
  4. Lost? Select any part and press F. The camera jumps to it.

More detail

  • Explorer and Properties are on the right side of the window. Explorer is on top and Properties is below it.
  • Click an object in the Viewport and it is highlighted in Explorer too. Click its name in Explorer and it is selected in the Viewport.
  • The flat platform with a round symbol on it is the SpawnLocation. Players appear on it when the game starts. Leave it where it is.
  • Made a mistake? Press Ctrl+Z to undo the last thing you did. Press it again to go back one more step.
Tip. If a panel is missing, open it from the Window menu. In older versions it is in the View tab.
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.

Still stuck? Write to us →

3
Step 3 / 10

Build the start platform

  1. On the Home tab click Part. A grey block appears.
  2. In Properties set Size to 12, 1, 12 and rename the part to Start.
  3. Turn on Anchored. An anchored part never falls and never moves.
  4. Pick a color you like with the Color button.

More detail

  • The new part appears in front of the camera, and its name in Explorer is Part.
  • To rename it, click it once in Explorer and press F2, type Start and press Enter.
  • In Properties, click the Size field, type 12, 1, 12 and press Enter. The three numbers are width, height and depth.
  • Anchored is a checkbox in Properties. A tick means it is on.
  • Use the Move tool (Ctrl+2) to put the platform next to the SpawnLocation, so players can walk onto it.
Common mistake. Forgetting Anchored. The part looks fine while you edit, then falls into the void when the game starts.
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.

Still stuck? Write to us →

4
Step 4 / 10

Add the jumps

  1. Select Start and press Ctrl+D to duplicate it. Pull the copy forward with the Move tool (Ctrl+2).
  2. Make it smaller with the Scale tool (Ctrl+3). A size of 6, 1, 6 works well.
  3. Leave a gap of 5 to 7 studs between platforms. Repeat until you have 6 to 8 platforms.
  4. 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.

Still stuck? Write to us →

5
Step 5 / 10

Add lava that resets the player

  1. Add a new Part between two platforms. Make it red, set Material to Neon, turn on Anchored and name it Lava.
  2. In Explorer hover over Lava, click the + button and choose Script.
  3. 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.

Still stuck? Write to us →

6
Step 6 / 10

Add checkpoints

  1. In Explorer hover over Workspace, click + and add a Folder. Name it Checkpoints.
  2. 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.
  3. 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.

Still stuck? Write to us →

7
Step 7 / 10

Make a platform that disappears

  1. Pick one platform in the middle of the course and add a Script to it.
  2. Paste this code and press Play to watch it blink.
Platform > Script
local platform = script.Parent

while true do
	task.wait(2)
	platform.Transparency = 1
	platform.CanCollide = false

	task.wait(2)
	platform.Transparency = 0
	platform.CanCollide = true
end

What each part does

  • while true do repeats forever.
  • task.wait(2) pauses for 2 seconds.
  • Transparency 1 makes the part invisible. CanCollide false lets players fall through it.

More detail

  • To add the Script, hover over the platform's name in Explorer, click + and choose Script, just like you did for the lava.
  • The platform is visible for 2 seconds and gone for 2 seconds. Players have to time their jump.
  • The first number is how long the platform stays visible. The second number is how long it stays gone.
  • Do not put this script in the start platform or in a checkpoint, or players will fall as soon as they arrive.
Tip. Change the two numbers to make the platform faster or slower.
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.

Still stuck? Write to us →

8
Step 8 / 10

Build the finish line

  1. Put a big anchored part at the end and name it Finish. Make it gold so players see the goal.
  2. 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.

Still stuck? Write to us →

9
Step 9 / 10

Test your game

  1. Press F5 to play. Run the whole course from start to finish.
  2. Fall into the lava on purpose. You should come back at your last checkpoint.
  3. Press Shift+F5 to stop.
  4. 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.

Still stuck? Write to us →

10
Step 10 / 10

Publish it

  1. Choose File → Publish to Roblox. Give the game a name and a short description.
  2. On the Creator Hub website open your game and fill in the Maturity questionnaire. Roblox needs it before other people can play.
  3. Set the game to Public and send the link to a friend.

More detail

  • The first time you publish, Studio asks for a name and a description. Click Create. After that, File → Publish to Roblox sends your newest changes.
  • Creator Hub is the website create.roblox.com. Sign in with the same account and click your game in the list.
  • The Maturity questionnaire asks what is in your game. Answer honestly. An obby like this one has no violence and nothing scary.
  • Roblox may ask for more before a game can be public, for example an age check on the account. The page tells you what is missing.
  • If you are under 18, do this step together with a parent.
Tip. Ask a friend to play while you watch. The places where they get stuck are the first things to fix.
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.

Still stuck? Write to us →

Now change it yourself

  • Add a fourth checkpoint. What do you have to name it?
  • Make three disappearing platforms that blink at different speeds.
  • Change the lava so it takes away only half of the health. Hint: humanoid.Health = humanoid.Health - 50