How to make character stop when facing the wall

Sorry i did read your title and you said facing wall so i presumed facing as lookong forward