Use an if statement. It should look something like this
If(controllerpessing) {
Motor rotate to
}
Else if (controllerpessing) {
Motor rotate to
}
Else {
Motor brake
}
Make sure to do the else part or the motor will continue to rotate
You have to make this code non-blocking by adding false at the end because VEXcode defaults it to true so it would look more like
Lift.rotateFor(directionType::rev,90,rotationUnits::deg,100,velocityUnits::pct,false);
To everyone that put false, I tried that before, but it just gave me a compile error, we used time which isnt very good but it works for now before our first tournament. I plan on switching to pros, but I can’t seem to get it to work in general right now so I’ve stuck with vex coding studio for now.