i redid your script, try it now, if it doesn't work i don't know the problem. Ensure that it is printing something, also if it shows if the code shows error, make sure to remove any space
onready var anim = $AnimatedSprite
func _process(delta):
_manage_animations()
func _manage_animations():
print("ggggggggggg")
if vel.x > 0 :
anim.play("MoveRight")
elif vel.x < 0:
anim.play("MoveLeft")
elif vel.y < 0 and facingDir.x == 1:
anim.play("MoveRight")
elif vel.y > 0 and facingDir.x == 1:
anim.play("MoveRight")
elif facingDir.x == 1:
anim.play("IdleRight")
elif facingDir.x == -1 :
anim.play("IdleLeft")
elif vel.y < 0 and facingDir.x == -1:
anim.play("MoveLeft")
elif vel.y > 0 and facingDir.x == -1:
anim.play("MoveLeft")
func playanimation (animname):
print("bbbbbbbbbbbbbbb)
if anim.animation != animname:
anim.play(animname)