Luacrash
attempt to concatenate a nil value
Also seen as: concatenate a nil value attempt to concatenate (local) nil concatenation Lua
What causes it
Your code tried to join (..) a nil value into a string. Common when building a message or query with a variable that doesn't exist yet.
How to fix it
Ensure the value being concatenated exists and is a string or number.
- Read what's nil in the parentheses.
- Confirm it's set before the concatenation line.
- Add a fallback:
local name = playerName or 'unknown'. - Watch for typos in the variable name.
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.