You need an interlock, something along the pseudo-code lines of:
Code:
boolean belt = false;
boolean toggle = true;
if (toggle && Button) { // Only execute once per Button push
toggle = false; // Prevents this section of code from being called again until the Button is released and re-pressed
if (belt) { // Decide which way to set the motor this time through (or use this as a motor value instead)
belt= false;
conveyorMotor.set(1);
} else {
belt= true;
conveyorMotor.set(0);
}
} else if(Button == FALSE) {
toggle = true; // Button has been released, so this allows a re-press to activate the code above.
}