Following a tutorial, my player wont move.

Godot Version

4.2.2

Question

I’ve been following a web tutorial for making a player character move on Godot Docs, but there isn’t any help for what i have been seeing?
The code i have is here (changed the names of files to not have _ ), and here is what the game looks like when i go and run it with the current code.



I might just find a different way to code this, but it might just be a small and easy fix idk how to do. Since the sprite i made is stuck in the upper left, and the buttons i set up wont do anything i wrote them to do.

Strange tutorial, you need to un-indent the position changing lines.

if velocity.length() > 0:
    velocity = velocity.normalized() * speed
    $AnimateSprite2D.play()
else:
    $AnimatedSprite2D.stop()

position += velocity * delta

otherwise your code is saying “if velocity is zero, add it (zero) to position”

You can paste code by pressing the </> button on a new line like so

```
type or paste code here
```