Invalid type in function ‘move_and_slide’?

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

so I was making a game or trying to and when i put

func _physics_process(delta):
    
    if Input.is_action_pressed(“ui_right”):
       motion.x = 100
     
 move_and_slide(motion)
 pass

it is telling me that it can’t conver arg 1 from vectors 2 to vector…

I can’t see what else it is saying so can someone help

Probably you are passing a vector2 to a kinematicbody inatead of a kinematicbody2d… could you post your whole script?

p7f | 2018-12-22 04:11