[General Help] Triggering Events and Listening

So i have been reading a shit ton, and I am very new to lua and have learned alot these past few days. Anyway, I am trying to trigger a client event during a function on the server side, but it doesn’t seem to trigger it, can someone tell me what I am doing wrong?
Client side:
RegisterNetEvent(‘testme’)
AddEventHandler(‘testme’, function(test, test)
function test(test)
TriggerEvent(‘chat:addMessage’, { args = { ‘Test is working’ } })
end
end)
Server:
RegisterServerEvent(‘testme’)
AddEventHandler(‘testme’, function(test)
TriggerEvent(‘es:addGroupCommand’, ‘test’, function(test)
end)
end)

And I have read the other posts and cant seem to figure out what I am doing wrong

If you are trying to trigger a client event from the server, you need to use TriggerClientEvent.

Yea… I figured it out after about 2300 different trial and errors. Thanks for the reply tho. I needed to “TriggerClientEvent” from the server. Lol, so simple yet took forever.

1 Like

No problem, just happy to help another Christopher out :wink:

Much Appreciated

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.