while (digitalRead(rightstopbutPin) == HIGH)
Here is one of your problems (some others I pointed out but you ignored).
The code will be stuck in this loop waiting for rightstopbutPin to be pressed but never looks at the other button.
while (digitalRead(rightstopbutPin) == HIGH)
Here is one of your problems (some others I pointed out but you ignored).
The code will be stuck in this loop waiting for rightstopbutPin to be pressed but never looks at the other button.