- Edited
I am new to coding and Godot and while I was watching a tutorial I got to the actually coding the movement of the character it just doesn't work. I copied the exact code and it just crashes. Anyone that can help?
This is my code
extends CharacterBody2D
`@export`` var move_speed : float = 100
func physics_process(delta):
var input_direction = Vector2(
Input.get_action_strength("right") - Input.get_action_strength("left"),
Input.get_action_strength("down") - Input.get_action_strength("up")
)
velocity = input_direction + move_speed
move_and_slide()`