• 2D
  • The character does not move down and up.

Do a print statement in func correrAbajo(): print("run down") See if it's being called. You did change it, sorry about that.
Your player is a vector2, so I don't see where it's connected to the node. I think you need to actually be moving by $boy.transform.origin.y = player.y or just position $boy.position.y = player.y or just replace player.y with $boy.position.y I don't think you would want to move the origin or not, not sure.

But I don't know why your left and right is working because that isn't connected to the node either.

Plus these lines just cancel each other out: $boy.transform.origin.y += 1.0 $boy.transform.origin.y -= 1.0

Can you write me the script? Do I have to connect any node?

Does the left and right work? First comment out these lines: $boy.transform.origin.y += 1.0 $boy.transform.origin.y -= 1.0

put a print statement in the up function. print("run up") or whatever you want. Then run it and push up and down on the joystick and see if it prints in the console window.

func correrAbajo():
    stateMachine.travel("run")
    player.y += RUN_SPEED
    $boy.scale.y = 1
    print("running up")

So?

extends KinematicBody2D

var player: Vector2
var RUN_SPEED = 200
var stateMachine
const umbralJoystick = 0.5
onready var joystick = get_tree().get_nodes_in_group("joystick")[0].get_parent().get_node("joystick/boton")

func _ready():
	 stateMachine = $AnimationTree["parameters/playback"]

# warning-ignore:unused_argument
func _physics_process(delta):
	$boy.transform.origin.y += 1.0
	$boy.transform.origin.y -= 1.0

	player = Vector2()
	#getControlsKeyboard()
	getControlJoystick()
	print("joystick" +  str(joystick.get_value().x))
# warning-ignore:return_value_discarded
	move_and_slide(player)
	
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().y > umbralJoystick:
		correrAbajo()
	elif joystick.get_value().y > umbralJoystick:
		correrArriba()


#Controlamos al personaje con el teclado
func getControlsKeyboard():
	if Input.is_action_pressed("move_right"):
		correrDerecha()
	elif Input.is_action_pressed("move_left"):
		correrIzquierda()
	if Input.is_action_pressed("move_down"):
		correrAbajo()
	elif Input.is_action_pressed("move_up"):
		correrArriba()
	
func idle():
	stateMachine.travel("idle")
	
func correrDerecha():
	stateMachine.travel("run")
	player.x += RUN_SPEED
	$boy.scale.x = 1

func correrIzquierda():
	player.x -= RUN_SPEED
	$boy.scale.x = -1

func correrAbajo():
	stateMachine.travel("run")
	player.y += RUN_SPEED
	$boy.scale.y = 1
	print("running up")
	
func correrArriba():
	stateMachine.travel("run")
	player.y += RUN_SPEED
	$boy.scale.y = -1
	print("running down")

Run it and look in the console window to see if it prints when you push the up down arrow keys or however you have it set up.

It says the state machine isn't playing. Does it show errors before that or is that the only one?

It shows it when I play the scene. It's the only error it gives me.

I think you are looking at the debugger, look at the console window, there are tabs on bottom and make sure the "output" tab is pressed at the very bottom of the screen. Then run it again and see if it prints anything in the window when you press up and down. If it doesn't put print statement in the left and right functions and see if it prints when the character goes left and right.

It doesn't put me down or up

extends KinematicBody2D

var player: Vector2
var RUN_SPEED = 200
var stateMachine
const umbralJoystick = 0.5
onready var joystick = get_tree().get_nodes_in_group("joystick")[0].get_parent().get_node("joystick/boton")

func _ready():
	 stateMachine = $AnimationTree["parameters/playback"]

# warning-ignore:unused_argument
func _physics_process(delta):
	$boy.transform.origin.y += 1.0
	$boy.transform.origin.y -= 1.0

	player = Vector2()
	#getControlsKeyboard()
	getControlJoystick()
	print("joystick" +  str(joystick.get_value().x))
# warning-ignore:return_value_discarded
	move_and_slide(player)
	
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().y > umbralJoystick:
		correrAbajo()
	elif joystick.get_value().y > umbralJoystick:
		correrArriba()


#Controlamos al personaje con el teclado
func getControlsKeyboard():
	if Input.is_action_pressed("move_right"):
		correrDerecha()
	elif Input.is_action_pressed("move_left"):
		correrIzquierda()
	if Input.is_action_pressed("move_down"):
		correrAbajo()
	elif Input.is_action_pressed("move_up"):
		correrArriba()
	
func idle():
	stateMachine.travel("idle")
	
func correrDerecha():
	stateMachine.travel("run")
	player.x += RUN_SPEED
	$boy.scale.x = 1
	print("running right")

func correrIzquierda():
	player.x -= RUN_SPEED
	$boy.scale.x = -1
	print("running left")

func correrAbajo():
	stateMachine.travel("run")
	player.y += RUN_SPEED
	$boy.scale.y = 1
	print("running up")

func correrArriba():
	stateMachine.travel("run")
	player.y += RUN_SPEED
	$boy.scale.y = -1
	print("running down")

Then you need to check your input setup. Did you set it up before? It's in project settings input map and check the move_down and move_up for spelling and make sure the keys are correct. If it's set up right, it will print because it's getting the input and sending it straight to that function.

The inputs ui_up and ui_down are already in the input map. You could use them instead of move_up and move_down.