Pls help with my code

Godot Version



can you please tell me whats wrong it says I should have 0 arguments but I have 1 but with out that the script wouldnt work

It will be:

velocity = motion * movement_speed

In Godot 4.0, there is no parameter in move and slide function but you can set velocity as it is built-in
Otherwise you codes is so long, you can just do like this:

var motion = Input.get_vector("left", "right", "up", "down")
1 Like

Thanks so much .Sorry for the trouble but how would I get it to move. I am making a basic top down movement controller and its not moving even with new code.


You forgot to set the velocity, please read my previous reply properly