I want to be able to have motors spinning while a button is being held and when the buttons is not being pressed the motors to not be doing anything. For some reason in this code the first part where I want to have the motor spin in the reverse direction doesn’t work. Can someone see an issue that I’m not seeing? Also this is going in my usercontrol while loop.
I think your problem is that you have 2 separate if statements. So, the first if statement (The one checking the X button) executes and makes your motors run in the reverse direction. However, immediately after, the second if statement executes, and since Y isn’t pressed, the motors are told not to run.
To fix this, use elseif to make a single if-elseif-else chain, like below: