motion = move_and_slide( seems like it's not using a 2d vector but a bool. Stands for boolean which is a value that can be true or false. If motion is a boolean it doesn't have a value motion.y. This would cause motion.y = -100 to cause the error you see. You may need to use velocity.y = -100 instead of motion.y to fix it.
I am not a Godot expert so please take this suggestion with a grain of salt.