Hi Kenura, you have to make sure that the main menu has a build index of 0 (that’s the number beside the scene in the build settings):
If it is not 0, you will have to update the number in your DestroyInMainMenu script (see highlight below) accordingly.
using UnityEngine;
using UnityEngine.SceneManagement;
public class DestroyWhenInMainMenu : MonoBehaviour
{
// Update is called once per frame
void Update()
{
if(SceneManager.GetActiveScene().buildIndex == 0)
{
Destroy(gameObject);
}
}
}