v3 · Activity 8 of 8 · local-variables · state-updates · execution-order · 5 min Runs here
Make a short score update using a starting variable, an update, and output before and after. Use the ideas from this module in a fresh example.
Start a local score at 4 and display it. Update that variable by adding 7, then display its stored value. Output must show the numbers 4 and 11, in that order.
4 11
Lines must stay in order. Spelling, capitalization and spaces inside a message matter.
local points = 2
print(points)
points = points + 3
print(points)This different example shows 2, then 5. Use the starting score and update requested by your task.
This activity reuses syntax you have already met.
Choose a local variable name for the score. Put the first print before the update and the second print after it.
This activity checks the two numeric outputs in order. Your variable name can differ from the example. This is practice state for one run, not saved Roblox player data.
Select a word or symbol in this authored example. Your editor draft stays unchanged.
points 2
points
points points 3
pointsThis 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.