Sprite wont jump or move

Godot Version

3.5.3

Question

Sprite wont jump or move

extends KinematicBody2D

var motion = Vector2(0, 0)
var speed = 200
var gravity = 10
var jump = -230
var double_jump = true

func _physics_process(delta):
   Move()
   Gravity()
   move_and_slide(motion, Vector2.UP)

func Move():
   var x_axis = Input.get_axis("ui_left","ui_right")
   motion.x = lerp(motion.x, x_axis * speed, 0.75)

func Gravity():
   if !is_on_floor():
   	motion.y += gravity
   else:
   	double_jump = true
   	motion.y = gravity

   if !is_on_floor() && motion.y > 0 && double_jump == true && Input.is_action_just_pressed("ui_jump"):
   	motion.y = jump
   	double_jump = false

I think you should use

motion = move_and_slide(motion, Vector2.UP)