Errors
The FiveM and Roblox errors people hit most, what they mean, and how to fix them.
FiveM: QBCore, ESX, ox_lib
ESX getSharedObject Deprecated – How to Fix (ESX Legacy)The esx:getSharedObject event was removed in ESX Legacy. Here's how to get the ESX object correctly with the export or the @es_extended/impoESX: 'attempt to index a nil value (local xPlayer)' – FixFix 'attempt to index a nil value (local xPlayer)' in ESX: ESX.GetPlayerFromId returned nil because the source is wrong, the player has leftFiveM: 'attempt to call a nil value (field ...)' – FixFix 'attempt to call a nil value (field ...)' in FiveM Lua: the function you call does not exist on that object, usually a renamed frameworkFiveM 'Couldn't load resource' / Missing fxmanifest.lua – FixFix FiveM 'Couldn't load resource' and 'Failed to load script' errors caused by a missing or invalid fxmanifest.lua, wrong folder structure FiveM 'Failed to verify protected resource' – FixFix the FiveM server error 'Failed to verify protected resource': the asset is granted to a different Cfx.re account than your license key, FiveM/Lua: 'end' expected near <eof> – FixFix the Lua syntax error "'end' expected (to close 'function' at line N) near <eof>" in FiveM or Roblox: a function, if, for or while block FiveM 'No such export' oxmysql / mysql-async Error – FixFix 'No such export execute in resource oxmysql' and MySQL nil errors in FiveM by loading oxmysql correctly and fixing start order.FiveM oxmysql: 'Unknown column ... in field list' – FixFix the oxmysql / MySQL error 'Unknown column in field list' on FiveM: the database table does not match what the script expects, usually beox_lib 'attempt to index a nil value (global lib)' – FixFix 'attempt to index a nil value (global lib)' in FiveM: load ox_lib in fxmanifest with @ox_lib/init.lua and ensure it starts first.QBCore 'attempt to index a nil value' – Causes & FixFix the QBCore error 'attempt to index a nil value' in FiveM. Learn why Player or PlayerData is nil and how to guard against it with workingQBCore is nil: 'attempt to index a nil value (global QBCore)' – FixFix 'attempt to index a nil value (global QBCore)' in FiveM by fetching the core object with GetCoreObject and fixing resource start order.QBCore: Player is nil from QBCore.Functions.GetPlayer – FixFix 'attempt to index a nil value (local Player)' in QBCore when QBCore.Functions.GetPlayer(source) returns nil: wrong source, player not lo
Roblox
Roblox 'attempt to index nil with' Error – Causes & FixFix the Roblox Luau error 'attempt to index nil with Humanoid' (or Character, leaderstats). Learn why it happens and how to safely wait for Roblox: 'attempt to perform arithmetic on nil' – FixFix the Roblox Luau error 'attempt to perform arithmetic (add) on nil and number': a variable you are doing maths with is nil, usually a misRoblox 'DataStore request was added to queue' Warning – FixFix Roblox DataStore throttling warnings: 'DataStore request was added to queue'. Use pcall, save less often, and save on PlayerRemoving andRoblox 'Failed to load animation with sanitized ID' – FixFix the Roblox error 'Failed to load animation with sanitized ID': the animation is not owned by the experience owner, a Team Create member Roblox: 'Http requests are not enabled' – FixFix the Roblox error 'Http requests are not enabled. Enable via game settings': turn on Allow HTTP Requests in Game Settings and make the reRoblox 'Infinite yield possible on WaitForChild' – FixWhat 'Infinite yield possible on ...:WaitForChild()' means in Roblox and how to fix it with correct paths, timeouts and the right script locRoblox: 'X is not a valid member of Y' – FixFix the Roblox Luau error 'X is not a valid member of Y': the child does not exist (yet), the name or capitalisation is wrong, or the scriptRoblox RemoteEvent Wrong Arguments (Player Passed Twice) – FixWhy your Roblox OnServerEvent arguments are shifted, and how FireServer automatically passes the player. Correct client/server code.Roblox ScreenGui Not Showing (Enabled = true) – FixFix a Roblox ScreenGui that stays invisible even though Enabled = true and your print runs: ResetOnSpawn, duplicate GUIs in PlayerGui, hiddeRoblox 'StudioAccessToApisNotAllowed' DataStore Error – FixFix the Roblox Studio DataStore error 'StudioAccessToApisNotAllowed: Studio access to APIs is not allowed': publish the place, enable Studio