Slipping motion using KinematicBody2D?

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

I’m trying to simulate an ice floor for my character but I can’t figure out how to achieve that using kinematicBody2D

this is my player script:

func _physics_process(delta):
	direction.y += gravity_speed * delta
	
	# vertical movement
	if(is_on_floor()):
		if(Input.is_action_just_pressed("ui_up")):
			direction.y=jump_speed
	
	# horizontal movement
	direction.x=Input.get_action_strength("ui_right") - Input.get_action_strength("ui_left")
	direction.x *= horizontal_speed
	
	direction=move_and_slide(direction,Vector2.UP)

and I made a StaticBody2D and gave it 0 friction in physics material override:

enter image description here

And it seems to work with Rigid bodies but not with KinematicBody2D,
I thought move_and_slide() should take care of this?

So how do I get my character to slip on certain grounds?