invalid set index 'flip_h' (on base: null instane') with bool code example
Example: invalid set index 'flip_h' (on base 'null instance') with value of type 'bool'
func _physics_process(delta):
vel.x = 0
#movement inputs
if Input.is_action_pressed("move_left"):
vel.x -= speed
if Input.is_action_pressed("move_right"):
vel.x += speed
#applying the velocity
vel = move_and_slide(vel, Vector2.UP)
#sprite direction
if vel.x < 0:
sprite.flip_h = true
elif vel.x > 0:
sprite.flip_h = false