← Back to journey

Bring a small lobby to life

Give a value a name

v7 · Activity 7 of 8 · Scores · 4 min Runs here

Workshop progress · step 7 of 8
Optional learning visualization
Scene choices
Chapter outline
Loading draft…
Activity 7 · Scores

local score = 10 gives the number a name. local introduces the name, score is your chosen name, and = stores the value on its right.

print(score) reads the stored number. print("score") would display the word instead. Run the two ready-made lines, then check your solution.

Your task

Store 10 in a local variable, then print that variable’s value.

Expected output
10

Lines must stay in order. Spelling, capitalization and spaces inside a message matter.

How your work is checked

The required syntax is stated in Your task. The Luau parser checks for local-variable, local-read; the output check verifies the stated result. It does not trace every intermediate variable value.

Syntax in this activity

New syntax: local, score, =, 10

Earlier ideas used here
  • addition
  • numbers
What this exercise checks

Actual Output · exact lines and order · extra output forbidden.

Successful execution is required. A compile error, runtime error or execution limit never completes this task.

Whitespace, matching single or double quotes, and different variable names are allowed. Output-only tasks accept any valid Luau solution meeting the displayed result and value types. Construct tasks use the stated straight-line form.

Lesson requirements: local-variable, local-read. These are exercise requirements, not Luau syntax rules.

Explain this code

Select a word or symbol in this authored example. Your editor draft stays unchanged.

   
Choose a highlighted part to see what it means.
Your goal

Store 10 in a local variable, then print that variable’s value.

Run code to see what happens. Check solution to test the activity.

Reset starter

Replace this code with the starter? Download your draft to keep a copy.

Code

Luau
Luau keyword highlighting · Ctrl/⌘ + Enter: Run · Esc: leave editor

Your output will appear here.

Ready