Friction not working

My character’s friction doesn’t work when you change the gravity (space to change gravity, wasd to move) and I can’t fix it because it only happens on the ceiling, can anyone help?

My game: Flowlab Game Creator - yes

1 Like

Try making the x velocity 0 when your a or d is up

1 Like

Thank you so much this is great and it really helped my game

:frowning: ur code is so messy