🎯 GOAL:
Learn new Lua keywords and make different objects in Roblox do cool stuff when something happens. This time, we're creating a creepy Hazard Lab scene like in Quarter Life.
🔧 What You’re Making Today:
A flickering light that turns on when clicked
A health pack that spawns in when a red button is pressed
A metal platform that rises after a short delay
🧠NEW KEYWORDS TO LEARN
🔹 true / false
What it means: These are yes/no values in code.
true = yes, do it
false = no, don’t do it
Example:
light.Enabled = true
Say it out loud:
“I’m turning the light ON, so light.Enabled should equal true!”
🔹 else
What it means: Works with ‘if’ keyword. If something is false, we should do what is in ‘else’.
Example: If the light is on (true) then turn is off, else if the light is off then turn it on.
if light.Enabled then
light.Disabled
else
light.Enabled
Say it out loud:
“The light was not on, so now enable the light and turn it on!”
🔹 Instance.new
What it means: This tells Roblox to make something new, like a button, part, or sound.
Think of it like crafting an object from scratch.
Example:
local medkit = Instance.new("Part")
Say it out loud:
“Make a new part and call it medkit.”
🔹 .Parent
What it means: This tells the computer where to put the thing you just made.
For example: into the game world (workspace) or inside another object.
Example:
medkit.Parent = workspace
Say it out loud:
“Put the medkit in the game world.”
🔹 Vector3
What it means: This gives Roblox the x, y, z position to move something in 3D space.
(Like coordinates on a map.)
Example:
platform.Position = Vector3.new(0, 10, 0)
Say it out loud:
“Move the platform to 10 studs up in the air.”
🔹 wait()
What it means: This tells the script to pause for a little while before doing the next thing.
Example:
wait(2)
Say it out loud:
“Wait 2 seconds before I do the next thing.”
🛠️ MINI PROJECTS
🧪 1. Flickering Light
In Roblox Studio:
Make a small room using rectangle parts for the walls and ceiling.
Add a small rectangular part and name it ‘LightSwitch’ inside the room
Add a PointLight to the LightSwitch
Set the PointLight Enabled property to false and change the light color so something fun like green or purple.
Add a Script and ClickDetector onto the LightSwitch
Script Example:
local light = script.Parent.PointLight
function onClick()
print("Turning on the light!")
if light.Enabled then
light.Enabled = false
else
light.Enabled = true
end
script.Parent.ClickDetector.MouseClick:Connect(onClick)
💊 2. Spawning a Health Pack
In Roblox Studio:
Create a rectangle Part and call it "SpawnButton”. The player will click on this part to spawn a health pack.
Add a ClickDetector to the SpawnButton
Add a script to SpawnButton. This script will:
Make a function called spawnMedkit that will create a new part with a specific size, position and color.
Add a onTouch function so that when the player touches the object it will add 20 health
Script Example:
function spawnMedkit()
print("Spawning health pack!")
local medkit = Instance.new("Part")
medkit.Size = Vector3.new(2, 1, 2)
medkit.Position = Vector3.new(0, 5, 0)
medkit.Color = Color3.fromRGB(255, 0, 0)
medkit.Anchored = true
medkit.Name = "Medkit"
medkit.Parent = workspace
local function onTouch(other)
if other and other.Parent:FindFirstChild("Humanoid") then
local human = other.Parent:FindFirstChild("Humanoid")
human.Health = human.Health + 20
print("You got healed!")
medkit:Destroy()
end
end
medkit.Touched:Connect(onTouch)
end
script.Parent.ClickDetector.MouseClick:Connect(spawnMedkit)
🧠 Quiz Questions for Georgie
You can only earn dad points if you can answer all of these:
What does true and false mean in a script?
What does Instance.new let you do?
What does .Parent do?
What does wait() do?
🏅 Dad Point Earned If:
Both projects are completed and working with a working light and health packs.
Your child explains all the new keywords clearly
Your child passes the end-of-day quiz (can retry)