event %s does not exist, or was not safe for net
Your TriggerServerEvent or TriggerClientEvent isn't arriving. It's almost always because the net event isn't registered with RegisterNetEvent. Here's the fix.
1 min read
The problem
When triggering an event between client and server you get "event X does not exist, or was not safe for net" and the handler doesn't run.
The cause
The receiving side didn't register the event as a net event with RegisterNetEvent (it only used AddEventHandler), or the event name doesn't match exactly between the trigger and the listener.
The solution
Register the event as a net event on the side that receives it:
lua
-- RECEIVING side (server.lua or client.lua)
RegisterNetEvent('mi_recurso:darDinero')
AddEventHandler('mi_recurso:darDinero', function(cantidad)
local src = source -- on the server, who triggered it
-- logic
end)
-- Modern short form (registers and handles in one):
RegisterNetEvent('mi_recurso:darDinero', function(cantidad)
local src = source
-- logic
end)Step by step
- 1.Use `RegisterNetEvent` on the listening side, not just `AddEventHandler`.
- 2.The event name must be IDENTICAL in the trigger and in the registration (watch out for capitalization and colons).
- 3.Check that the resource registering the event is started (`ensure`).
- 4.Never trust client data on the server: always validate with `source`.
Related guides
Keep learning
Last updated: 2026-06-17. Crxative-M is not affiliated with Cfx.re or Rockstar Games.
