Turn scary red Output lines into a precise map of what's wrong, and fix errors in a set order.
You've hit errors all course — that was the point. This lesson turns error-reading from luck into a skill. By the end, a red Output line stops being scary and becomes a precise map of what's wrong.
Roblox errors follow one shape:
ServerScriptService.MoneySystem:14: attempt to perform arithmetic on a string
Four fields, left to right:
| Field | Example | Meaning |
|---|---|---|
| Where it ran | ServerScriptService.MoneySystem | the script (and its path) |
| Line number | :14 | which line threw |
| Message | attempt to perform arithmetic on a string | what actually happened |
| (Usually) context | — | which variable was at fault, if Roblox knows |
That first field isn't just "which script" — the full path tells you where the script lives, which tells you who can touch it. A bug in a LocalScript is a client problem; a bug in a Script is a server problem. The error is already telling you which side to investigate.
The error 'Workspace.Script:7' tells you what first?
When an error appears, don't stare at your whole script. Do this:
local coins = player.leaderstats.Coins
print("coins is:", coins, "value:", coins and coins.Value)
coins.Value = coins.Value + 10
print showing coins is: nil beats any guess. The problem isn't your math — it's that Coins was never created (wrong name, or created in the wrong PlayerAdded).
Step 4 of the reading order is to add a above the suspicious line to see the real values.
The discipline that keeps debugging honest: change one thing, Play, watch that same line.
Changing three things at once is how you get errors that blame the wrong line. When the fix works, re-test the same way you reproduced it. If you can't reproduce the bug, you can't verify the fix.
The most common beginner error is 'attempt to index nil' — thing.Name where thing is nil. Usually it means the object wasn't found (misspelled name), didn't exist yet (needs WaitForChild), or was never assigned. The message plus line number names the exact line — go read that line.
A script errors on a line where coins could be nil. Write the print line that reveals what coins actually is before the crash.
local coins = player.leaderstats.Coins
-- reveal what coins is
Next: the print-debugging habit that senior developers actually use.