HitEffect = function()
for NPC,Ped in {PedFindInAreaXYZ(0, 0, 0, 99999)} do
if PedIsHit(Ped) and PedIsValid(Ped) then
local hX, hY, hZ = PedGetHeadPos(Ped)
local Effect1 = EffectCreate("GymLightSmash", hX, hY, hZ)
EffectSlowKill(Effect1, 0.7)
end
Wait(0)
end
end
Why sometimes there is no trigger effect when Ped is attacked