# I belive that is because you are using is_on_floor(), and for Godot to know what the floor is you would have to specify it in the move_and_slide().