Help!! Cant set .enabled scripts in other objects

Look, I have “Card1” wich set “scriptothercard” in “otherobject” like enabled=true
Then, i have “Card2” wich set “scriptothercard” in the “otherobject” like enabled=false.

The problems is:
Use “Card1” Once set true
Use “Card2” Again set false
Use again “Card1” and nothing happens, didnt set endabled=true again

Alredy try everything.

Gonna let the codes here Card1:
var HOLDER : GameObject; //Holds BOTH scripts

function Start () {

  //HOLDER.GetComponent(Walk).enabled = true;
}

function OnTriggerEnter (other : Collider) { if (other.gameObject.tag == "PlayCube") {

  HOLDER.GetComponent(Walk).enabled = true;
  
  yield WaitForSeconds (0.001);
  Destroy(other.gameObject);
}

}

Card2:
var HOLDER : GameObject; //Holds BOTH scripts

function Start () {

  //HOLDER.GetComponent(Walk).enabled = true;
}

function OnTriggerEnter (other : Collider) { if (other.gameObject.tag == "PlayCube") {

  HOLDER.GetComponent(Walk).enabled = false;
  
  yield WaitForSeconds (0.001);
  Destroy(other.gameObject);
}

}

Try storing the component in a reference on the object and enabling and disabling the references instead of calling GetComponent(). I am thinking that there is a good chance that when you call GetComponent() looking for a disabled component it is not going to work.

in C#

public Component walkComponent;

Then you will just drag and drop the Walk component into the variable in the editor.

It might be worth a try if you are still grinding on this.

~Cheers

Dude, after you disable an object can only enable it again via an external object, or with another class.