Stop applying damage to enemy when dead on client? Works on server.


Noob here trying to make this work. When the enemy dies, player stops applying damage. On the client, the damage is still applied after health goes to 0 and is dead is true unless player stops attacking and leaves collision box/hit box. My brain is fried and I’ve been workign on this for days. Thanks for any help.

You should maybe check if health is <= 0 immediately before you set the damage off event any damage else if false, it may continue to run the logic. Your code looks quite a bit different than mine, but perhaps also check it again after to prevent logic from running beyond when it first appropriately fires off the death sequence.

Additionally, I’m not sure how you are applying the damage in the first place, but that may be an area to look into.