You should use one big chain of if ... else if statements, with only one else case at the end.
With your current code, consider what happens if you press only button R1. Then the first if .. else if ... else statement tells both motors to spin forward, and the second if ... elsestatement tells both motors to stop. Telling motors to both spin and stop at the same time will cause undesired behavior.
If you instead structure your code like this:
if (Controller1.ButtonR1.pressing()){
// spin both motors forward
}
else if (Controller1.ButtonR2.pressing()){
// spin both motors backward
}
else if (Controller1.ButtonLeft.pressing()){
// spin one motor forward and the other backward
}
else{
// stop both motors
}
then you’ll only be telling the motors to do one thing at once.
Is there a way to have 2 different intakes spin at the the same time by pressing L1 when my robots tray is down but when the tray is up one intake spins when pressing L1 and the othe spins when pressing R1?
I don’t recommend using pneumatics in VRC because of how much they limit your motors, especially if you’re just starting out. Also because they really are not useful for this game.