My autonomous with turns doesn't work well

void goForward(int x){
LF.rotateFor(x,turns);
RF.rotateFor(x,turns);
RB.rotateFor(x,turns);
LB.rotateFor(x,turns);
LF.stop();
RF.stop();
LB.stop();
RB.stop();
}
this is my void rn
but when I do the autonomouse it goes motor per motor instead of all at once
Anyone know how to fix it?

You need to use either startRotateFor or add “false” as another parameter. You will want to do this for the first three motors and not last one. RotateFor is blocking and will not continue onto the next line unless told to.

3 Likes