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: using UnityEngine;using System.Collections;using System.Collections.Generic; - Pastebin.com