When I try walking, my sfx plays severel times while I’m holding the key, and it keeps playing after I release it
My code:
velocity.x = move_toward(velocity.x, direction * SPEED, ACCELERATION * delta)
if Input.is_action_pressed("right"):
$Sprite.flip_h = false
#$Walk.play()
if is_on_floor():
$Sprite.play("walking")