- Home /
 
 
               Question by 
               ChompIV · Mar 22, 2019 at 12:01 AM · 
                carscript errordisableenableenable and disable script  
              
 
              Script isn't disabling?
Hi! I'm trying to make a script disable after the logic returns true. It isn't disabling though?? Does anyone see anything wrong with this script? Its all in one script (CarEngine)..
  }
    private void FixedUpdate()
    {
        if (currectNode == 1 && counter > 3)
        {
            isBraking = true;
            Braking();
            wheelRL.brakeTorque = 100000;
            wheelRR.brakeTorque = 100000;
            wheelFL.brakeTorque = 100000;
            wheelFR.brakeTorque = 100000;
            print("stop");
            GetComponent<CarEngine>().enabled = false;
            // disable scritp
        }
        else
        {
            ApplySteer();
 
               Whole script here: https://pastebin.com/1xptk3FX
               Comment
              
 
               
              Answer by fre303 · Mar 22, 2019 at 04:44 AM
Try using this.enabled = false, or just enabled = false (they are the same thing).
Your answer