Stage 4: Lava Touch

Your players can choose their path now, saved at Checkpoint_04. But so far, your world just stands there. Today it fights back — because today you write your first Lua.
Narration transcript
- Stage Three gave your players a real choice and saved it at Checkpoint zero four. Keep that tested checkpoint open. Stage Four begins there.
- Build a hazard field in your world, learn event, check, and action, and ship your first Lua script.
- Spoken bridge: Mission ready. First, understand the idea that makes this stage work.
a hazard field in your world that reacts to the player
how an event starts a Lua instruction
your first working script
Idea
Narration transcript
- Until now your game only watched players move. Event-driven code lets it react. A touch is the event, finding a Humanoid is the check, and changing Health is the action. Your hazard can look like anything — lava, slime, freezing water — because the script lives inside the part it guards and never looks at its name. The name Lava is for you: it keeps your Explorer readable.
- Spoken bridge: Turn that idea into three small Logic Cards.
An event is something the game notices. "A part was touched" is an event. An event handler answers: "When that happens, what should the game do?" Your handler will run a check (is this a player?) before its action (change their Health). Event, check, action — the shape of almost every game script you'll ever write.
Today is your first Lua. You'll type one small piece at a time, run it, and see it work. Punctuation and capital letters matter. And here's the secret: your script will live inside the hazard part, so it never even looks at the name. Lava is a name for you — it keeps your Explorer readable. On screen, the part can be anything your world needs.

Logic Board
Finish these cards from left to right. Each card becomes a Code Quest below.
- 1Card A
Narration transcript
- Build a readable hazard field with safe stones across it.
- The safe route is readable before the player jumps.
Show danger
Build a readable hazard field with safe stones across it.
Done when: The safe route is readable before the player jumps. - 2Card B
Narration transcript
- Connect the Touched event and prove it with a print.
- Output prints whatever touches the hazard.
Listen for touch
Connect the Touched event and prove it with a print.
Done when: Output prints whatever touches the hazard. - 3Card C
Narration transcript
- React only to players, then save the checkpoint.
- The hazard respawns players and Checkpoint zero five saves.
- Spoken bridge: The plan is complete. Pick your Build Mode on the page and build one card at a time — pause after every Studio action.
Check, act, save
React only to players, then save the checkpoint.
Done when: The hazard respawns players and Checkpoint_05 saves.
Build
Pick your Build Mode for the geometry — the script afterward is the same for everyone, because the code is the lesson.
Every builder plays this stage in their own mode. Which sounds like you?
Not sure? Start with Guided — you can level up on any stage, and your pick follows you through the whole course.
Names that must match
Build inside Workspace → Course → Stage04, from Checkpoint_04 to Checkpoint_05. The scripts here live inside the parts they control — no name hunting yet. These names keep your Explorer readable and your stage debuggable. In Stage 7, scripts start finding parts by name — then spelling becomes law.
LavaThe hazard surface your script watches.Must have: Anchored true · Material Neon · Script: LavaHazardStone_1–6Safe stones across the hazard. Build 4 to 8 — your call.Landing_05The landing that ends the stage — Checkpoint_05 stands here.
Reference buildStuck, or just want to copy ours? Here is exactly how we built this stage.
These values always work together. Copy them as-is, or borrow a few and keep the rest of the stage yours.
Build this partLava
Part · BlockOpen recipe
Lava
Part · Block- Size
- 24 × 1 × 68
- Color
- Bright orange
- Material
- Neon
- Anchored
- ✓ Yes
- Orientation
- 0 × 0 × 0
- CanCollide
- ✓ Yes
- Place
- Position [0, 1.5, 221] inside Workspace → Course → Stage04
Children: Script: LavaHazard.
Build this partStone_1–6
6 Parts · BlockOpen recipe
Stone_1–6
6 Parts · Block- Size
- 6 × 1 × 6
- Anchored
- ✓ Yes
- Orientation
- 0 × 0 × 0
- CanCollide
- ✓ Yes
- Place
- 1: [-4, 3.5, 195] · 2: [4, 3.5, 205] · 3: [-4, 3.5, 215] · 4: [4, 3.5, 225] · 5: [-4, 3.5, 235] · 6: [4, 3.5, 245] inside Workspace → Course → Stage04
Build this partLanding_05
Part · BlockOpen recipe
Landing_05
Part · Block- Size
- 12 × 1 × 12
- Anchored
- ✓ Yes
- Orientation
- 0 × 0 × 0
- CanCollide
- ✓ Yes
- Place
- Position [0, 3.5, 258] inside Workspace → Course → Stage04
Code
Build the hazard field
Narration transcript
- Build your hazard field inside Stage zero four: a wide danger surface named Lava with safe stones crossing it, laid out your way per your track. Cross the stones once — the hazard does not hurt yet.
- Spoken bridge: Card A now matches its success check. Continue to Card B.
A — Show the danger. Build your hazard field inside Stage04: a wide danger surface named Lava with safe stones crossing it, laid out your way per your track. Cross the stones once in Play mode — the hazard doesn't hurt yet. That's next.
Listen for the event
Narration transcript
- First prove the event fires. A print is a programmer's flashlight — it shows you the invisible.
- Insert a Script named LavaHazard inside Lava, type the Touched connection with its print line, then press Play, touch the hazard, and watch Output.
- Spoken bridge: The behavior passed its focused test. Finish the checkpoint handoff.
First prove the event fires. A print is a programmer's flashlight — it shows you the invisible.
B — Listen. Insert a Script inside Lava, rename it LavaHazard, delete the placeholder, and type the connection below. Press Play, touch the hazard, and watch Output.
localcreates a name this Script can use.script.Parentmeans the Lava part holding this Script.Touchedis the event.otherPartis the information the event gives your function.- Each
endcloses one open block.
local lava = script.Parent
lava.Touched:Connect(function(otherPart)
print("Lava touched by", otherPart.Name)
end)
If a name prints in Output, your game just noticed something for the first time.
Check the player, then save
Narration transcript
- Replace the print with the Humanoid check and the damage action, compare the finished script, and test both surfaces. Then add Landing zero five and complete the Checkpoint zero five recipe.
- Spoken bridge: The next checkpoint saved. One designer check before you style it: does your stage pass?
C — Check, act, save. Replace the print line with the check and action below, compare the finished script, and test both surfaces. Then add an anchored Landing_05 at the end of your crossing (reference: [12, 1, 12]) and complete the checkpoint recipe.
local character = otherPart.Parent
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.Health = 0
end
Keep the earlier first and last lines. A player touching the hazard should respawn; ordinary parts cause no error.
Compare your finished script
local lava = script.Parent
lava.Touched:Connect(function(otherPart)
local character = otherPart.Parent
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.Health = 0
end
end)
Checkpoint recipeSave progress at Stage 5
Using the voice guide? It reads one recipe step, waits while you work, then continues when you choose Done — hear next step.
- Insert one SpawnLocation in Workspace and rename it
Checkpoint_05. Set Size to about[6, 1, 6]and Anchored totrue. Centered on the landing that ends Stage 4, with its top just above the landing surface. (Our reference build puts it at Position[0, 4.5, 258].) - Set Neutral to
false, Enabled totrue, and AllowTeamChangeOnTouch totrue. - Set the SpawnLocation TeamColor to
Bright violet. Set its visual BrickColor to the same named color. TeamColor controls respawning; BrickColor only controls what the pad looks like. - Point at Teams in Explorer, select its +, and insert one Team named
Stage 5. Set its TeamColor toBright violetand AutoAssignable tofalse. Never reuse this TeamColor on another checkpoint. - Press Play. Climb to and touch
Checkpoint_05, then reset your character and confirm you respawn there. Press Stop before editing again.
Workspace → Checkpoint_05Teams → Stage 5 (Bright violet)Does It Pass?
Narration transcript
- Time for the designer check. Play your crossing and walk the pass list: danger a player reads at a glance, a fair stone route, a hazard that hurts while every stone stays safe, and a clean Output. A rule that fails is just the next thing to tune.
- Spoken bridge: Your stage passes — it is a real level now. Time to make it feel like your game.
Does your stage pass?
Play your stage and check each one. A rule that fails isn't a mistake — it's just the next thing to tune.
- Nothing moves, falls, or drifts — every part stays exactly where you put it.Check: Press Play — everything stays put.Tip: Anchored on for every part, and CanCollide on for anything players stand on.
- The dangerous surface looks dangerous at a glance — bright, glowing, unmistakable.Check: A player names the danger before touching anything.Tip: Neon material says do-not-touch in every world — slime, void, or ice.
- Safe stones cross the hazard, and every jump can be made — no luck needed.Check: Cross on the stones three times without falling in.Tip: Stone-to-stone gaps up to about 7 studs work with a running jump; keep calm 3–5 stud hops near the start.
- Touching the hazard damages the player; every stone stays safe.Check: Touch both in one playtest and watch your health bar.
Make It Yours
Narration transcript
- Your hazard IS your world. Its name stays Lava in Explorer — on screen it can be slime, void, or freezing water. Recolor it, pick its material, and make the danger belong to your game.
- Spoken bridge: That is your stamp on the stage. Now explain what made it work.
Your hazard IS your world. Its name stays Lava in Explorer — on screen it can be bubbling slime, freezing water, or the void between sky islands. Recolor it, pick its material, and make the danger belong to your game. That's the split every developer learns: what the computer needs (the name) versus what the player sees (your world).
Help Ladder
Stuck? Choose what went wrong
Pick the problem that matches. Open one clue, try it, then return only if you still need help.
My parts overlap or miss the next checkpoint
Clue 1: small hint
Narration transcript
- Stop Play mode and check one part against the stage rules before touching anything else.
Clue 2: where to look
Narration transcript
- Check Workspace, Course, Stage zero 4, and keep both checkpoints directly inside Workspace.
Workspace → Course → Stage04. Find Checkpoint_04 and Checkpoint_05 directly inside Workspace.Clue 3: worked answer
Narration transcript
- Walk your stage rules top to bottom and fix the first rule that fails. If you want a layout that always works, open the reference build and copy its values.
Checkpoint_04.the hazard does nothing
Clue 1: small hint
Narration transcript
- First decide whether the event or the player check is failing.
Clue 2: where to look
Narration transcript
- Restore the print line and watch Output, and confirm the Script is indented beneath Lava in Explorer.
Clue 3: worked answer
Narration transcript
- The Script starts with local lava equals script dot Parent, connects lava dot Touched, finds the Humanoid from otherPart dot Parent, and sets Health to zero inside the if block.
local lava = script.Parent, connects lava.Touched, finds Humanoid from otherPart.Parent, and sets Health to 0 inside the if block.Learn What Happened
Narration transcript
- The Touched event supplied the part that hit. The script checked for a Humanoid before acting, so only characters take damage. Event, check, action — the shape of almost every game script you will ever write.
- Spoken bridge: Use one small prediction to transfer that idea.
script.Parent found your hazard because the Script lives inside it — the name never entered the code, which is why the look didn't matter either. The name is for you and your Explorer. (In Stage 7, scripts start hunting parts by name — then spelling becomes law.) Touched supplied the touching part. The if condition protected the action: Health changes only when the toucher belongs to a character with a Humanoid. Event, check, action.
Try This
Narration transcript
- Predict what happens if the Humanoid check is removed, compare that with the current safe behavior, and connect each script section to event, check, or action.
- Spoken bridge: Finish with four proof checks. Each check must match something you can observe or explain.
Try this
Three short thinking checks. Use evidence from the stage you just built.
Prove It
Narration transcript
- Spoken bridge: Final proof. Confirm one result at a time.
- A player can see which surfaces are dangerous before touching them, and there is a fair path across.
- Lava damages the player and every safe stone stays safe.
- Checkpoint_05 saves progress and reset returns you there.
- You can identify the event, check, and action in the script.
Narration transcript
- Stage Four complete. Your world reacts now — you wrote real Lua and earned one hundred XP. Stage Five teaches your platforms to disappear.