v3 · Activity 3 of 8 · variable-reading · strings · 2 min Runs here
"coins" is the literal text coins. Without quotation marks, coins refers to the stored value. Predict which line displays 10, then run the code.
Make a prediction, then press Run code to see the text coins followed by the number 10 stored in the local variable.
coins 10
Lines must stay in order. Spelling, capitalization and spaces inside a message matter.
local score=4
print("score")
print(score)The text score appears first, then the stored number 4.
This activity reuses syntax you have already met.
Quotation marks tell Luau to use the words themselves. Luau does not look up a variable inside this string.
The second print uses the name without quotation marks, so it reads the number stored under that name.
Select a word or symbol in this authored example. Your editor draft stays unchanged.
10
This is a private experiment copy. It does not replace your answer or complete the activity.
Your output will appear here.
Replace this code with the starter? Download your draft to keep a copy.
Your output will appear here.
Sign in with RoCreators to save private progress across devices. Community verification is separate.