can't flip the AnimatedSprite

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By cookieoil

the node is the child of the player, but still I get this error:

Invalid set index 'flip_h' (on base: 'null instance') with value of type 'bool'.

Here is my code:

if Input.is_action_pressed("ui_right"):
    $HitEffect.flip_h = false

if Input.is_action_pressed("ui_left"):
    $HitEffect.flip_h = true

Big thanks for the help