Any idea how to detect pedestrian damage and attacker?

I am trying the following on my client script to detect pedestrian damage from which I intend to spawn a myriad of different AI behaviours from but for some reason these are not throwing anything when I play on my server. I have built some other scripts so I know the basics but for some reason the code below doesn’t give me anything besides that initial print “Add Event Handlers” of course.

Citizen.CreateThread(function()
    Citizen.Wait(5)
    print("Add Event Handlers")
    AddEventHandler("gameEventTriggered", function(eventName, args)
        print("yes1")
    end)
    
    AddEventHandler("entityDamaged", function(eventName, args)
        print("yes2")
    end)
end)

https://docs.fivem.net/docs/scripting-reference/events/client-events/#entitydamaged