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

: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. 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

Most likely your$HitEffect reference is wrong. Double check that the names are exactly the same (letter for letter, case for case)

Wakatta | 2021-09-14 12:54