Im trying to Freeze a game object either by enabling Kinematic in the ridgidbody of by constraining the Axis via another script with Getcomponent.
public bool TankReady = false;
public GameObject Harvester;
void OnTriggerStay (Collider other){
if (Input.GetKey (KeyCode.F) && TankReady == true){
Harvester.GetComponent<Rigidbody>().isKinematic = true;;
}
}
I get no errors but I seem to not get what I want. Any suggestions?