it might've been where the variable for health is at a negative number and the it wasn't coded to end at <= (less than or equal to) 0 but instead at just = 0, meaning it won't at -1, -2, -3, -4 and so on, and you might've gotten hit by multiple things at once, making it skip 0 hp (yea ik a bit about scratch)