func getControlJoystick():
if joystick.get_value().x == 0:
idle()
elif joystick.get_value().x > umbralJoystick:
correrDerecha()
elif joystick.get_value().x < umbralJoystick:
correrIzquierda()
elif joystick.get_value().x > umbralJoystick:
correrAbajo()
elif joystick.get_value().x > umbralJoystick:
correrArriba()
Your up and down calls are using the joystick x axis instead of y. Both up and down are also doing greater than umbralJoystick, if the range of the joystick is -1 to 1 then one of them should be < -umbralJoystick.
func correrAbajo():
stateMachine.travel("run")
player.x += RUN_SPEED
$boy.scale.y = 1
func correrArriba():
player.x -= RUN_SPEED
$boy.scale.y = -1
Both up and down functions are adding to the player.x instead of player.y.