ScriptsAboutBlogToolsKnowledge BaseReviewsFAQBasketDocsSupport
Luacrash

SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua

Also seen as: scheduler.lua error citizen scripting lua scheduler SCRIPT ERROR scheduler

What causes it

The path citizen:/scripting/lua/scheduler.lua in a stack trace is FiveM's internal Lua scheduler — it is NOT a file in your resource. It appears because FiveM's coroutine scheduler wraps your script. The real error is one or two lines deeper in the trace, in a file that belongs to your resource.

How to fix it

Ignore the scheduler.lua line — read further down the stack trace to find the actual file and line in YOUR resource.

  1. Look past the citizen:/scripting line to the next line that names a file inside your resource (e.g. @my_resource/client/main.lua:88).
  2. Open that file and line — that's where the real error is.
  3. Fix that specific line; the scheduler.lua reference resolves itself once the underlying error is gone.

Related errors

Related guides

Still stuck? We can help.

Optimized, dual-framework scripts for QBCore and ESX from Viper Development — escrow protected, delivered instantly to your Cfx portal.