set active not working

i have a gameobject named activator that’s inactive and greyed out on the hierarchy however even though 'if (gone) is true it still wont be active.

 if (Gone)
    {
        
        Activator.SetActive(true);
    }

Is the script that is trying to run this if statement attached to the activator gameobject? If so, scripts will not run on an object that is inactive in the hierarchy.