I tried using this logic, it looks like it makes sense but it conflicts with the fire system. I got this particular one from someone else which is overly complicated, which is why finding alternatives to this is hard. My event tick does nothing.
What is inside your update health bar function?