How to make the character move only left and right when it enters trigger box

image
Is that what you mean? I am just not sure how to execute it because I already have my begin overlap plugged in