Update variable while running if statement

spyguy518:
Kinda, If you move back, actuator only follows if button is pressed.

"Kinda" is a concept that is totally alien to Arduino programming. You need to be precise if you want to get a program that works.

I suggest you write a new description of all the behaviours that you want your system to have - leaving nothing out. It is pointless starting to write a program before you have a very clear idea of what it should do.

If you are not sure what you want then write some short test programs to explore the options.

...R