How do you fix an "Invalid get index 'value' (on base: 'null instance')" debug return in the code:
func _on_Area2D_body_entered(body): #connected signal
if body.get_name() == "Character":
body.respawn()
$HealthBar.value -= 15
The $HealthBar is a TextureProgress node and I am trying to decrease its value when the main character of my game enters the enemy's area2d. I'm not sure why this code keeps returning as a null instance.
Thank you for helping