Making wall hugging

I’m making a wall hugging mechanic and I’m confused about two things;

How would I make the player stay on the wall and how would I make the player only be able to move left and right after they’re stuck to the wall, right now I’m firing a ray behind the player to check if they’re against the wall.

2 Likes