Home/ Guides/ How to Install FiveM Scripts the Right Way (and Fix the Errors)

How to Install FiveM Scripts the Right Way (and Fix the Errors)

Every FiveM script ships with “drag and drop into resources” instructions, and every server owner has watched that lie fall apart at 2am. Here’s how to install scripts so they actually work — and how to read the errors when they don’t.

The Correct Install Order

  1. Read the manifest first. Open fxmanifest.lua and look at the dependencies block. Install and start dependencies (ox_lib, oxmysql, a target system) BEFORE the script that needs them.
  2. Place the folder correctly. Resources live one folder deep: resources/[category]/scriptname/. The folder name must match what you ensure. If the zip extracted to scriptname-main/scriptname/, move the inner folder.
  3. Run the SQL. If there’s a .sql file, import it before first start. Half of all “script broken” reports are a missing table.
  4. Configure before you start. Coordinates, job names, item names — a config pointing at a job your server doesn’t have fails quietly.
  5. Ensure in order. In server.cfg, dependencies start before dependents. ensure ox_lib before anything that uses it.

Reading the Errors That Actually Happen

“attempt to index a nil value”

The script reached for something that doesn’t exist — usually a missing dependency, a mis-cased native, or a framework mismatch (a QBCore-only script on ESX). Check the line it names; the missing thing is on it.

Script starts, nothing appears in game

Almost always config: wrong coordinates, a job gate you don’t pass, or a target/interaction resource it expects that you don’t run. Also check the F8 client console — client errors don’t show in the server console.

“No such export” / “dependency failed”

Start order. The exporting resource isn’t running yet when this one starts. Fix your ensure order in server.cfg.

UI opens but is a black box or won’t load

NUI cache. Restarting the resource isn’t enough after UI file changes — do a full client reconnect, or clear the FiveM cache if it persists.

Items don’t work in ox_inventory

Items must be registered in ox_inventory’s items file (or via the script’s install step) — using an item that isn’t defined does nothing, silently.

Escrow Scripts: What You Can and Can’t Touch

Paid scripts delivered through Cfx.re escrow (Keymaster) keep core files encrypted but leave config.lua, locales, and usually the UI open. That’s where all your customization happens. If a script’s config can’t do what you need, ask the developer — ours ship with intentionally open configs and we answer on Discord.

Golden rule: install ONE script at a time and restart. Installing five at once means debugging five at once — and they’ll blame each other.

Skip the setup headaches

Grab production-tested scripts from the store, or have us build the whole server for you.