Align Player To Surface past 90 Degrees

Hello, I currently have a system that aligns the player to surfaces below 90 degrees but once I hit 90 degrees it just stops and makes my character fall.

I want to implement this on a halfpipe since its a smooth transition to 90 degrees once it reaches the top of the halfpipe but not on a wall.

I can align the player up until the top part of the halfpipe at the moment.

also to make the character go around in a loop would be nice to.

Any help is appreciated thanks!