im trying to get this script to deactivate this gameobject when collided with the cube but if one gameobject is already deactivated to deactivate a differnt gameobject
the script
function OnTriggerEnter(other: Collider){
if (other.tag == “Player”){
GameObject.Find(“(1)Green”).SetActiveRecursively(false);
if (GameObject.Find("(1)Green") == false){
GameObject.Find("(2)Yellow").SetActiveRecursively(false);
}
}
}