I am pretty new to coding and have been doing my best by learning form vidieos. But my code still isnt working
extends CharacterBody2D
var speed = 200
var velpcity = Vector2.ZERO
func _ready():
pass
func _physics_process(_delta):
velocity = Vector2()
if Input.is_action_just_pressed('ui_down'):
velocity.y += speed
if Input.is_action_just_pressed('ui_up'):
velocity.y -= speed
if Input.is_action_just_pressed('ui_left'):
velocity.x -= speed
if Input.is_action_just_pressed('ui_right'):
velocity.x += speed
move_and_slide()