How to Read an Error Message
Every error message contains at least three pieces of useful information:- The error type — what kind of problem occurred (e.g.
TypeError,attempt to index nil) - The location — the file name and line number where the error was detected
- The message — a description of what went wrong
Error Reference
Lua Errors
Lua Errors
attempt to index nil value
This is the most common Lua error. It means you tried to access a property or call a method on a variable that is nil (has no value).FindFirstChild() returns nil because the object does not exist yet — use WaitForChild() instead, or add a nil check.attempt to call nil value
You tried to call something as a function, but it turned out to be nil. This usually means a typo in the function name or a missing require().require()d it and that the function is actually defined in the module’s return table.stack overflow
A stack overflow means a function called itself (directly or indirectly) so many times that Lua ran out of memory for the call stack. The most common cause is infinite recursion.expected near '<eof>' or expected 'end'
These are syntax errors. Lua expected a keyword like end, ), or then but reached the end of the file (or an unexpected token) instead. Every if, for, while, do, and function block needs a matching end.if/for/function openings and make sure each one has a corresponding end. Most code editors highlight mismatched blocks.Python Errors
Python Errors
NameError: name 'x' is not defined
You referenced a variable or function that Python cannot find in the current scope. Either it was never defined, it was defined later in the file, or it is in a different scope.Username and username are different variables.TypeError: unsupported operand type(s)
You tried to perform an operation on incompatible types — most often mixing a string and a number.int(), float(), or str() to coerce values.IndentationError: unexpected indent
Python uses indentation to define code blocks. An IndentationError means a line is indented more (or less) than Python expected.def, if, for, while, and with block is consistently indented — either always 4 spaces or always one tab, never a mix.FileNotFoundError: [Errno 2] No such file or directory
Python could not find the file at the path you provided.os.path.exists() to verify a file exists before opening it, or use an absolute path to avoid ambiguity about the working directory.General Debugging Tips
General Debugging Tips
Use Print Statements to Trace Values
When you are not sure what a variable contains at a given point, print it. Placeprint() calls at key moments — before a function call, inside a loop, or after a condition — to watch values change as the script runs.Isolate the Problem
If a long script is failing, comment out sections until the error disappears. The last section you commented out is where the problem lives. Then narrow it down further within that section.Check Types Before Using Values
Many errors happen because a value is a different type than you expected. Print the type to confirm.Read the Full Traceback
Python tracebacks show the entire call chain leading to the error — read them from bottom to top. The bottom line is the actual error; the lines above show which function calls led there.Roblox: Use the Output and Developer Console
In Roblox Studio, open the Output window (View → Output) to see print statements and errors in real time. For client-side errors that do not appear there, press F9 during a play session to open the Developer Console and switch to the Client tab.Submitting a Bug Fix Request
When you ask us to fix a broken script, the more context you provide, the faster we can solve it. Here is exactly what to include:Include all of the following in your bug fix request:
- The full error message — copy and paste the entire error, including the file name and line number. Screenshots are helpful too.
- The relevant script — share the complete script, or at minimum the function/section where the error occurs.
- What you expected to happen — describe the intended behaviour in one or two sentences.
- What actually happened — describe what the script did instead (wrong output, crash, no output, etc.).
- When it happens — does the error occur every time, or only under certain conditions? (e.g. “only when the player’s inventory is empty”)
- What you have already tried — if you made any changes attempting to fix it, let us know so we do not retrace your steps.
Next Steps
Submit a Request
Ready to hand off a broken script? Submit a bug fix request and we will get it sorted.
Troubleshooting
Browse common issues and solutions in our troubleshooting reference.