I am trying to turn off my Player child node area2D Hurtbox via function to make the player invincible. The function call is triggered by an animation which calls it on a frame.
On my Player.gd:
onready var hurtbox = $Hurtbox
func roll_invincibility_started():
hurtbox.set_deferred("monitoring", false)
I have tried a few things instead of hurtbox.set_deferred such as
get_node("Hurtbox").monitoring == false
How can I do it?