if (reversing) { //Put whatever code you use to detect if you're reversing here myMotor.set(joystick.getYAxis() * -1); //Set a motor to the inverse of the Y axis. }