How to write code for only two choices. Simple go left to right

I want to create a code for the character to choose weather to go left or right. Please help.

Tappable or none tappable?

Also is the camera following the character of is the character exiting

tappable and yes camera follows the character