Audio clip problems!!!

Basically I have a game with two scenes in it , the first scene has an empty object with an audio clip and a script attached to it,the script is a Singleton script that does not destroy on load, which allows the empty object with the audio source to carry on playing between scenes. Everything’s works perfectly, but on my second scene i would like a UI button to destroy the script the audio and the empty object attach to the first scene. I have attempt this before, the problem with this is the script has don’t destroy on load so when I attempt to destroy it with another script the audio still continues to play because of don’t destroy on load. Is there a way around this? Thank you!!!

I have attempt this before, the problem with this is the script has don’t destroy on load so when I attempt to destroy it with another script the audio still continues to play because of don’t destroy on load

This sounds like you got it wrong. You can Destroy game objects that have been flagged with DontDestroyOnLoad. My guess is that you called Destroy and passed the script reference, not the game object reference. If you pass it a script (or any component), that script will be removed but the game object will be intact otherwise. If you pass it a game object, then that game object, its components and children will be removed. Here’s an example that attempts to capture what you were describing.

PersistentObject.cs

using UnityEngine;

// Exists in Scene1
public class PersistentObject : MonoBehaviour
{
    static PersistentObject instance;

    void Awake()
    {
        instance = this;
        DontDestroyOnLoad(gameObject);
        GetComponent<AudioSource>().Play();
        Invoke("LoadLevel", 1);
    }

    void LoadLevel()
    {
        Application.LoadLevel("Scene2");
    }

    public static void Destroy()
    {
        Destroy(instance.gameObject);
    }
}

DestroyPersistentObjectOnClick.cs

using UnityEngine;

// Exists in Scene2
public class DestroyPersistentObjectOnClick : MonoBehaviour
{
    public void OnClick()
    {
        PersistentObject.Destroy();            
    }
}