Using brakeTorque & Going backwards?

Hello all.

I am having an issue with some code.

   if (currentSpeed >= topSpeed && speedLimited == true){
    wheelRR.motorTorque = 0;
    wheelRL.motorTorque = 0;
  }
else {
    // This is where the power is applied to the wheels
    wheelRR.motorTorque = engineTorque * Mathf.Clamp(Input.GetAxis("Vertical"),-1,1);
    wheelRL.motorTorque = engineTorque * Mathf.Clamp(Input.GetAxis("Vertical"),-1,1);
    if (!Input.GetAxis("Vertical")){
        wheelRR.brakeTorque = 30;
        wheelRL.brakeTorque = 30;  
    }

    else {
        //wheelRR.brakeTorque = 0;
        //wheelRL.brakeTorque = 0;
        wheelRR.brakeTorque = brakeTorque * -1 * Mathf.Clamp(Input.GetAxis("Vertical"),-1,0);
        wheelRL.brakeTorque = brakeTorque * -1 * Mathf.Clamp(Input.GetAxis("Vertical"),-1,0);
    }
}

The problem is with the brakeTorque. If I remove it and stop my car by holding down the ‘S’ key it applies a negative value and slows me down. Unfortunately, it’s not slowing me down fast enough. Also, when I am at a stop and press S, I will go backwards.

If i use the code that I posted here, it is applying a brakeforce which stops me very well but it doesn’t allow me to go reverse!

What can I do to fix this?

Try with negative torque. If not, try with forces. AddForce, AddRelativeForce.