Roblox Luau errors, explained
Find the message Roblox Studio printed. Each page says what it means in plain words, shows the smallest script that triggers it, and gives the fix.
Practice Luau in 5-minute lessons
One Deep Dive a day is free. No card.
Errors while the game runs
Red lines in the Output window. The script stops on that line.
- attempt to index nil with 'Character'
- leaderstats is not a valid member of Player "Players.Player1"
- attempt to call a nil value
- attempt to perform arithmetic (add) on nil and number
- attempt to concatenate nil with string
- attempt to compare nil < number
- Script timeout: exhausted allowed execution time
- invalid argument #1 to 'ipairs' (table expected, got nil)
- Unable to assign property Text. string expected, got Instance
- attempt to index number with 'Value'
- attempt to index boolean with 'Value'
- Requested module experienced an error while loading
- Attempted to call require with invalid argument(s).
- stack overflow
- attempt to modify a readonly table
- attempt to get length of a nil value
- Argument 1 missing or nil
- FireServer can only be called from the client
- OnServerEvent can only be used on the server
- DataStoreService: StudioAccessToApisNotAllowed: Studio access to APIs is not allowed.
- Humanoid is not a valid member of Model "Workspace.Player1"
- attempt to perform arithmetic (add) on string and number
- Unable to cast value to Object
Errors before the script starts
Syntax errors: Luau could not read the script at all.
Warnings and surprises
Orange lines, editor underlines, and code that runs but does the wrong thing.