Player health isn't changing

Godot Version

4.7

Question

I’m making a game for the first time and am currently adding the player’s health and making it so enemies do damage but it isn’t updating the ProgressBar node


Please check Posting guidelines in #Help channel.

You have to write HealthBar.update() whenever you change the hitpoints. Or emit the healthChanged-signal, which doesn’t seem to exist unless it is not visible in the screen shot.

So either use HealthBar.update() or healthChanged.emit() whenever you change the hitpoints.