Destroy(GameObject) works in editor but not in build and run

OK so I am trying to implement a simple check in Start(), where if the player has completed in app purchase, the button no longer shows. My code works perfectly in Unity editor preview, the button disappears from view, and also disappears from the hierarchy. But when i build and run to my android device, the button stays visable, and I can still click it ( ie run animation), just nothing happens.

public void Start()
    {
        Load();
        audioSource = gameObject.AddComponent<AudioSource>();
        if (paid == 1)
        {
            GameObject.Destroy(GameObject.Find("StopAudio"));
            Education = Resources.LoadAll<AudioClip>("Sounds/Paid/");
            Debug.Log("The length of the audio array is: " + Education.Length);
            
        }
        else
        {
            Education = Resources.LoadAll<AudioClip>("Sounds/Education/");
            Debug.Log("The length of the audio array is: " + Education.Length);

        }

I have tried checking to make sure Find(GameObject) is not returning null, and it is not, I am just at my wits end to work out why it works in editor and not on phone.
The GameObject is called “StopAudio” in hierarchy [used to be a stop button I repurposed, have not got round to renaming it yet].
I have also tried DestroyImmediate.

Have you tried to just disable it? “gameObejct.SetActive(false);” You could also refference the button. So for example try this:

at the top: GameObject buttonToDisable; //in javascript: var buttonToDisable : GameObject;

then later: buttonToDisable.SetActive(false); // exactly the same in javascript

I alwys do that instead of GameObejct.Find(“xyz”); It´s supposed to be faster I think.

I am not that familiar with c++, so i hope that bit of code is correct.

I’m Having the same problem. Had you solved it? @gwicks

EDIT: I find that I had tagged all body component of my Goalkeeper as GK, That was the problem, After that I tag the parent object (in my case GoalkeeperHolder) as MainGK.

After that I destroy the parent object and that works perfectly.

As like: GameObject temp = GameObject.FindWithTag(“MainGK”);
Destroy(temp);