How to control multiple motors with one button using VEXcode V5 Blocks

I am trying to run 2 motors on a tower to lift an arm. I have a forever loop with my drive control, inside the forever loop I have an if/else statement that will lift the arm using both motors, but it will not run an additional if/else statement to lower the arm. What am I missing?

Hard to say without seeing the code… Can you post a screenshot / use the “share” feature to generate a PDF?

1 Like


It is because you are using two separate if statements to control the same action. Instead, you should use an else/if statement. When you are trying to lower your arm, the if/else statement underneath forces the motor to stop. EDIT: Just realized that VEXcode Blocks doesn’t have if and else if. This should suffice:


That did it. Thanks!