this code is supposed to constantly decrease the player’s health (with delay) when the enemy collides with the player
however as soon as the enemy collides with the player it shows the infinite loop error
any way to fix this?
Get rid of While Loop, make an actual loop:
The delay must be in the loop, but in your case it’s outside the loop, so it’s useless, nothing ever happens after the delay.
cool, thanks!


