Move_slide not working

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By N0tnl1sh

I just started using godot ,I normally was using Unity,but because that godot is better in performance,I am using godot right now.
I was following a tutorial and he just wrote this:

    class_name Actor

extends KinematicBody2D
func _Physics_process(delta:float) → void:
var velocity:=Vector2(300,0)
move_and_slide(velocity)

the script above is the Actor.gd
and there is another script called"Player.gd"
in player.gd:

extends Actor

and its supposed to just make the node attached to it just move
but the node that I attached the script is not moving when I press f6
I tried attaching the node the actor.gd but it didn’t work neither.

:bust_in_silhouette: Reply From: njamster

The code works fine. But the method is called_physics_process (with a lowercase ‘p’) not _Physics_process (with an uppercase ‘p’). Also the node Player.gd is attached to needs to be a KinematicBody2D, but everything else should immediately throw an error, so I’m guessing that’s not the problem here.