How to make character stop when facing the wall

No problem, I should’ve been more specific.