'MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it. so can someone solve to me

help me guys I am getting this error.

the line of code its highlighting is this Player.SetActive(true);

and this is the entire void its in public void OnUnityAdsDidFinish(string placementId, ShowResult showResult) {

    Player.SetActive(true);

    disableDeathScreen();

    curentHealth++;




    addHealth();



    StartCoroutine(Text());
    




    // Load another ad:
    Advertisement.Initialize("");

}

it happens when I return to the mainmenu "while in playmode" then go back to the game scene it gives this error



Solution 1:[1]

In a different script, the Player object must have been called via Destroy(). Check your other scripts for references to this object.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 obieFM