Roblox Studio error

Error occurred, no output from Luau.

What Error occurred, no output from Luau. means in Roblox Studio, the two things that cause it with the code that triggers each, and the fix for each one.

Updated 14 November 20263 min readErrorLuauWritten by

In short

A script stopped with an error, but the error had no text to print. That happens when code calls error() with nothing in it, or error(x) while x is nil, for example the second value of a pcall that did not fail. Studio cannot show a message it was not given, so it prints this instead. Give every error call a string, and check values before you pass them on.

  • Something called error with nil, so there was nothing to print.
  • Search your scripts for error( and look at what each one passes.
  • Always pass a string, and add the context: error(`[Shop] no price for {itemName}`).
On this page
  1. What it means
  2. Causes and fixes
  3. Fix it with RoCode
  4. Find the line
  5. Questions
  6. Sources

What the message means

Output (example)
Error occurred, no output from Luau.

Other forms of the same message:

  • Error occurred, no output from Lua.

error(value) stops the current script (or the function a pcall wraps) and hands value to whoever catches it. Normally value is a message, and Output shows it in red with the script and line. When value is nil, there is no message and no line number to show.

Older Studio builds print Error occurred, no output from Lua. It is the same message; Roblox renamed the language Luau.

Causes and fixes

Two things cause this error in practice. Each one below has the smallest code that triggers it, then the fix.

error() was called with no message

Some scripts use a bare error() as a quick way to stop. It works, but leaves nothing in Output to tell you where or why.

Breaks ModuleScript in ServerScriptService named Buy
local function buy(player, itemName)
	if not player:GetAttribute("Loaded") then
		error() -- stops, but prints: Error occurred, no output from Luau.
	end
	print(player.Name, "bought", itemName)
end

return buy

Pass a message that names the script and what went wrong. For a check that is expected to fail now and then, warn and return instead of stopping.

Fixed ModuleScript in ServerScriptService named Buy
local function buy(player: Player, itemName: string): boolean
	if not player:GetAttribute("Loaded") then
		warn(`[Buy] {player.Name} tried to buy {itemName} before their data loaded`)
		return false
	end
	print(player.Name, "bought", itemName)
	return true
end

return buy

A nil value was passed on to error

Code that re-raises an error often passes along a variable without checking it. If the call actually worked, or the variable has a typo, the value is nil.

Breaks ModuleScript in ServerScriptService named Coins
local DataStoreService = game:GetService("DataStoreService")

local store = DataStoreService:GetDataStore("Coins")

local function loadCoins(userId)
	local ok, result = pcall(function()
		return store:GetAsync(tostring(userId))
	end)
	if not ok or result == nil then
		-- a new player: ok is true and result is nil, so this raises nil
		error(result)
	end
	return result
end

return loadCoins

Handle "nothing saved yet" as a normal case, and only raise when the call really failed, with a message that includes the original error.

Fixed ModuleScript in ServerScriptService named Coins
local DataStoreService = game:GetService("DataStoreService")

local store = DataStoreService:GetDataStore("Coins")

local function loadCoins(userId: number): number
	local ok, result = pcall(function()
		return store:GetAsync(tostring(userId))
	end)
	if not ok then
		error(`[Coins] load failed for {userId}: {tostring(result)}`)
	end
	if typeof(result) ~= "number" then
		return 0 -- new player
	end
	return result
end

return loadCoins

Fix it in your place

Paste the error, RoCode fixes it in your place

Copy the line from Output and paste it here. RoCode opens the script it names in the place you have open in Studio, works out which of the causes above it is, and edits the code there instead of handing you a snippet to paste.

For example: Error occurred, no output from Luau.

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.

How to find the line that causes it

  1. This message has no script name or line number, so start from what stopped working, and the scripts behind it.
  2. Search all scripts with Ctrl+Shift+F for error(. Look for calls with nothing inside the brackets, or with a variable that could be nil.
  3. Free models and plugins can do this too. If you cannot find it in your scripts, disable recently added scripts one at a time, or set a breakpoint on each error( you find and press Play.

Questions

Why is there no line number?

Studio prints the line along with the error message. With no message, it has nothing to attach it to, so you have to find the call yourself.

Is it the same as Lua?

Yes. Older Studio builds said no output from Lua. Roblox scripts use Luau, a language based on Lua, and the message was renamed.

Should I use error or warn?

Use error with a message when the code cannot continue and the caller should know, often inside a pcall. Use warn and return for problems the game can live with, such as a player clicking twice.

Can RoCode fix it?

Yes. Paste the message into RoCode and say what stopped working. It searches the scripts in your open place for the empty or nil error calls and gives each one a message.

Sources and further reading

How the code was checked: every block marked Fixed passes Luau's strict type checker against Roblox's API definitions (luau-lsp, 14 November 2026), and every block marked Breaks compiles and fails only when it runs. The message wording was checked against the message strings in Roblox Studio itself (macOS build installed 12 November 2026) on 14 November 2026, and the nil error value by running the code with the Luau command line tool. A type check catches misspelt APIs and wrong types, not game logic, so playtest in Studio before you publish.

More Roblox errors

All Roblox Studio errors

Stop hunting errors line by line.

RoCode reads the scripts in your open place, fixes the error where it happens and tells you what it changed. Free every day, no card required.