Errors
Roblox Studio error messages
Look up the message Roblox Studio printed in Output. Each page shows the exact wording, what it means in plain words, the real causes with the smallest code that triggers each, the fix for each, and how to find the line. New to reading errors? Start with how to fix Roblox script errors, which explains the Output window and a debugging routine that works for any script.
Fix it in your place
Paste any error, RoCode fixes it in your place
Not on the list, or not sure which cause it is? Paste the line from Output. RoCode opens the script it names in the place you have open in Studio, finds the cause and fixes it there.
RoCode is an AI agent for Roblox Studio: it reads the scripts in the place you have open, finds the line and edits it there, and every change is an undo point. It runs on Windows or macOS with a desktop browser. Free to start, with free credits every day.
Nil values and wrong types
The most common runtime errors: a value was nil, or not the type the code expected.
Objects, properties and names
An object that is not there yet, a misspelt name, or a value Roblox cannot use for that property or argument.
Scripts, modules and events
Scripts that run too long, modules that fail to load and events that trigger themselves.
Syntax errors
The script never starts, because Luau cannot read it. The Script Editor underlines these in red.
Client, server and remotes
Code on the wrong side of the client and server split, and RemoteEvents nobody listens to.
Data stores, HTTP, animations and teleports
Errors from Roblox services that behave differently in Studio or need a setting or permission first.
All errors at a glance
The message as Output prints it, with your own names in place of the quoted ones.
| Output says | What it means |
|---|---|
attempt to index nil with 'X' | The value before the dot was nil: a FindFirstChild that found nothing, LocalPlayer on the server, or a character that has not spawned. |
attempt to index number with 'X' | You used a dot on a number or true/false: usually a .Value read twice, or ipairs variables in the wrong order. |
attempt to call a nil value | You called something that is not a function: a misspelt name, a function defined below the call, or a module that does not return it. |
attempt to perform arithmetic (add) on nil and number | Maths on something that is not a number: a missing table value, an IntValue without .Value, or text from a TextBox. |
attempt to concatenate string with nil | The .. operator got nil, an object or true/false: a missing value, a part instead of its Name, or a boolean. |
attempt to compare nil < number | A comparison got nil, text or an object instead of two numbers: a missing value, a TextBox string or an IntValue without .Value. |
attempt to iterate over a nil value | A for ... in loop got nil instead of a table: data that has not loaded, a function that returned nothing, or an attribute. |
invalid argument #1 to 'ipairs' (table expected, got nil) | A built-in function such as ipairs, math.floor or string.sub got nil or the wrong type for one of its arguments. |
Infinite yield possible on | WaitForChild has waited 5 seconds for an object that has not appeared: a wrong name, nothing creates it, or the client cannot see it. |
X is not a valid member of Y | A dot reached for a child or property that is not there: a typo, an object that has not loaded yet, or the wrong side. |
Unable to cast value to Object | A Roblox function wanted an Instance (a Player, a Part) and got a number, a string, a table or a CFrame instead. |
Argument 1 missing or nil | A Roblox function got nil, or nothing, for a value it needs: a variable never set, a left-out argument or a remote value. |
Unable to assign property X. Y expected, got Z | You set a property to the wrong type of value (nil, a number for a Vector3, Color3 for BrickColor) or one you cannot change. |
Unable to create an Instance of type "X" | Instance.new got a class name that does not exist or cannot be created: a typo, a service, or the Name you meant to set. |
Something unexpectedly tried to set the parent of X to NULL | Two pieces of code moved the same object in the same moment, usually a Parent change inside a ChildAdded or AncestryChanged handler. |
TweenService:Create property named 'X' cannot be tweened due to type mismatch | A tween goal has the wrong type for its property (a CFrame for Position), or names a property the object does not have. |
Requested module experienced an error while loading | require() failed because the ModuleScript itself broke while it ran: its own error, no return value, or a require loop. |
Script timeout: exhausted allowed execution time | A loop ran too long without yielding and froze the game until Roblox stopped it: a while loop with no task.wait. |
Maximum event re-entrancy depth exceeded | An event handler changes the thing it listens to, which fires the event again, over and over, until Roblox stops it. |
stack overflow | A function keeps calling itself (or two call each other) with no way to stop, until Luau runs out of room. |
cannot resume dead coroutine | A coroutine that already finished, or crashed, was started again. Usually coroutine.wrap called twice or a stored thread resumed. |
Unknown global 'x' | Script Analysis found a name that was never defined: a typo, a local used outside its block, or a service never fetched. |
Expected ')' (to close '(' at line 1), got <eof> | A bracket was opened and never closed, most often the ) after end in :Connect(function() ... end). |
Expected 'end' (to close 'function' at line 1), got <eof> | A function, if, for or while block was opened and never closed with end. The message says which block and on what line. |
Expected identifier when parsing expression, got ')' | Luau expected a value (a name, number or string) and found a symbol or keyword: a missing value, = for ==, or end) after a plain function. |
Incomplete statement: expected assignment or a function call | A line has a value that does nothing: a comparison on its own, a method name without (), or a sum with no variable to store it. |
Expected <eof>, got 'end' | One end too many: the script was finished but Luau found another end, or an else after an end that closed the if. |
FireServer can only be called from the client | A RemoteEvent was used from the wrong side: FireServer or OnClientEvent in a server Script, FireClient or OnServerEvent in a LocalScript. |
Remote event invocation queue exhausted | A RemoteEvent was fired many times with no handler on the other side, so Roblox stored them until the queue filled, then dropped them. |
Http requests are not enabled. Enable via game settings | HttpService is off for this experience, or the call came from a LocalScript. Turn on Allow HTTP Requests in Experience Settings. |
Studio API access is not enabled (DataStore 403) | Data stores are blocked in Studio until the place is published and Enable Studio Access to API Services is switched on. |
DataStore request was added to queue | Your game called a data store faster than Roblox allows, so requests are queued, and once the queue is full, dropped. |
Failed to load animation with sanitized ID | Roblox would not load that animation for this experience: someone else owns it, a group game uses a personal upload, or the ID is wrong. |
Questions
Where do I see Roblox Studio errors?
In the Output window. Open it from the Window menu, or with its button on the Script tab, then press Play. Errors are red and warnings are orange. Syntax errors also show in the Script Analysis window and as red underlines in the Script Editor.
Which error should I fix first?
The first red line after you press Play. Later errors are often knock-on effects of the first one, so fixing it can make the rest disappear.
Why does the message name my script with dots, like ServerScriptService.Shop:12?
That is where the script sits in the Explorer, then the line number. ServerScriptService.Shop:12 means line 12 of the script named Shop inside ServerScriptService. Click the line in Output and Studio opens that script at that line.
Can RoCode fix the error for me?
Yes. Paste the line from Output into RoCode. It reads the scripts in the place you have open in Studio, finds the cause and edits the code there, and each change is an undo point. It is free to start, with a free credit every day.
Paste the error. RoCode fixes it in your place.
RoCode is an AI agent for Roblox Studio. It reads your scripts, fixes the line that breaks and tells you what it changed. Free every day, no card required.