Lesson 2 / 12 · 8 min · Beginner

Variables

  • ✓ create local vars
  • ✓ change values
  • ✓ print values

Start

1. Understand

Think of a variable as a labeled box that holds a value.

Why do Roblox developers care?

Games remember coins, health, speed, timers, and round state with variables.

Show deeper explanation

Technical: Technical notes for Variables — expand when ready.

Roblox: In Roblox Studio, variables shows up in scripts, Parts, and game systems.

2. See

IDEA↓Variables↓GAME BEHAVIOR

3. Try · Run

Browser Luau

Browser Luau Try it yourself

Output


    

Your turn: Change one value, Run, and watch Output.

4. Predict

local coins = 10
print(coins)
coins = coins + 5
print(coins)

What will happen when you Run?

5. Break · Fix

Common beginner mistake

Check spelling and Output before rewriting everything.

6. Build · Challenge

Roblox Studio — In Roblox Studio, variables shows up in scripts, Parts, and game systems.

Related project

Checkpoint: You can explain and try variables.

You learned Variables

Continue to Data Types →