Rotate based on surface?

That post doesn’t take in count of the forwar direction problem i was talking about.
What this post does is only rotate the object on the normal of the wall