How to make duplicate unique?

So I have created a fully working quiz script attached to a small rotating sphere. When I collide with the sphere I get a quiz popping up on my screen and I have to answer the correct question.

Here is a gif of how the script works right now.

However, when I create a duplicate of this sphere. I am thrown a null pointer exception, and it doesn’t work.

Under you will see 2 of the 3 scripts I am using. I think the last one is irrelevant. It is just to make a timer work when Time.Scale = 0. Any help is very appreciated!

using UnityEngine;
using System.Collections;
using UnityEngine.UI; 

public class QuizManager : MonoBehaviour {
    public Question[] questions;
    [SerializeField]
    private GameObject Quiz;
    private Question currentQuestion;
    [SerializeField]
    private GameObject displayText;
    private bool clickTrue;
    private bool clickFalse;
    [SerializeField]
    private GameObject displayTimer;
    [SerializeField]
    private GameObject trueButton;
    [SerializeField]
    private GameObject falseButton; 
    private string correct = "Correct";
    private string fals = "Wrong"; 
    private static float delay = 2.0f;
    private bool Answer;
    [SerializeField]
    private GameObject knight; 

    void OnTriggerEnter(Collider col) {
        if (col.gameObject.name == "Knight") {

            knight.GetComponent<ClickMove>().enabled = false; 
            Quiz.SetActive(true);
            Time.timeScale = 0.0f; 
            getRandomQuestion();
            displayText.GetComponent<Text>().text = currentQuestion.fact;

            StartCoroutine("Counter", 1); 

        }

    }

    void getRandomQuestion()
    {
        int RandomIndex = Random.Range(0, questions.Length);
        currentQuestion = questions[RandomIndex]; 
    }

    public void TrueButton() {
        Answer = true; 
        clickTrue = true;
        trueButton.GetComponent<Button>().enabled = false;
        falseButton.GetComponent<Button>().enabled = false;

        if (currentQuestion.isTrue && clickTrue) //Nullpointer exception! Object reference not set to an instance of the object. 
        {
            StartCoroutine(WaitCorrect(delay));

        }
        else
        {
            StartCoroutine(WaitFalse(delay));
        }

    }

    public void FalseButton() {
        Answer = true; 
        clickFalse = true;
        trueButton.GetComponent<Button>().enabled = false;
        falseButton.GetComponent<Button>().enabled = false;

        if (!currentQuestion.isTrue && clickFalse)
        {

            StartCoroutine(WaitCorrect(delay));

        }
        else
        {
            StartCoroutine(WaitFalse(delay));
        }

    }

    
    private IEnumerator WaitCorrect(float delay)
    {
        
        yield return StartCoroutine(CoroutineUtilities.WaitForRealTime(delay-1));
        displayText.GetComponent<Text>().text = correct;
        yield return StartCoroutine(CoroutineUtilities.WaitForRealTime(delay));
        Quiz.SetActive(false);
        Time.timeScale = 1.0f;
        knight.GetComponent<ClickMove>().enabled = true;
        knight.GetComponent<Playerstat>().addHealthEnergy();
        DestroyObject(gameObject); 
    }

    private IEnumerator WaitFalse(float delay)
    {

        yield return StartCoroutine(CoroutineUtilities.WaitForRealTime(delay-1));
        displayText.GetComponent<Text>().text = fals;
        yield return StartCoroutine(CoroutineUtilities.WaitForRealTime(delay));
        Quiz.SetActive(false);
        Time.timeScale = 1.0f;
        knight.GetComponent<ClickMove>().enabled = true;
        DestroyObject(gameObject);
    }

    private IEnumerator Counter(float delay)
    {
        for (int Count = 8; Count >= 0; Count--)

        {
            if (Answer)

            {
                StopCoroutine("Counter"); 
            }

            displayTimer.GetComponent<Text>().text = Count.ToString(); 
            yield return StartCoroutine(CoroutineUtilities.WaitForRealTime(delay));
        }

        Quiz.SetActive(false);
        Time.timeScale = 1.0f;
        knight.GetComponent<ClickMove>().enabled = true;
        DestroyObject(gameObject);

    }

}

The quiz script.

using UnityEngine;
using System.Collections;

[System.Serializable]
public class Question {

    public string fact;
    public bool isTrue; 
	
}

OK I’ve butchered your scripts for you.

The Gist of this is : If you feel like you should call something “Manager” there should probably be only 1 of them.

I separated out parts between two scripts.

QuizManager, which does what it did before (but modified) and QuizPrompt which is the new script to go on the Orb. The Orb pokes the QuizManager to do its job…and thats that. Note that the QuizPrompt sends a reference to the calling Orb so that the QuizManager can destroy it once its finished its process.

QuizManager script now goes on to an Empty GameObject called QuizManager (surprise surprise).

This approach means that you can now HardCode/ Drag And Drop your buttons etc in the Editor and have no fear of losing references.

Dont let the line

Quiz = GameObject.Find("CanvasGroup").transform.Find("Quiz").gameObject;

baffle you. GO.Find doesnt find inactive objects but T.Find does so i found the parent with GO.Find and used T.Find to find the inactive Quiz child.

using UnityEngine;
using System.Collections;
using UnityEngine.UI; 

public class QuizManager : MonoBehaviour {
    public Question[] questions;
    [SerializeField]
    public GameObject Quiz;
    public Question currentQuestion;
    [SerializeField]
    private GameObject displayText;
    private bool clickTrue;
    private bool clickFalse;
    [SerializeField]
    private GameObject displayTimer;
    [SerializeField]
    private GameObject trueButton;
    [SerializeField]
    private GameObject falseButton; 
    private string correct = "Correct";
    private string fals = "Wrong"; 
    private static float delay = 2.0f;
    private bool Answer;
    [SerializeField]
    private GameObject knight;
	public GameObject currentOrbReference;

	void Start()
	{
		knight = GameObject.Find("Knight");
		Quiz = GameObject.Find("CanvasGroup").transform.Find("Quiz").gameObject;
	}
	
    public void FireMe() {
			Answer = false;
            knight.GetComponent<ClickMove>().enabled = false; 
            Quiz.SetActive(true);
            Time.timeScale = 0.001f; 
            getRandomQuestion();
            displayText.GetComponent<Text>().text = currentQuestion.fact;
			trueButton.GetComponent<Button>().enabled = true;
			falseButton.GetComponent<Button>().enabled = true;
            StartCoroutine("Counter", 1); 
        }

    public void getRandomQuestion()
    {
        int RandomIndex = Random.Range(0, questions.Length);
        currentQuestion = questions[RandomIndex]; 
    }

    public void TrueButton() {
        Answer = true; 
        clickTrue = true;
        trueButton.GetComponent<Button>().enabled = false;
        falseButton.GetComponent<Button>().enabled = false;

        if (currentQuestion.isTrue && clickTrue)
        {
            StartCoroutine(WaitCorrect(delay));
        }
        else
        {
            StartCoroutine(WaitFalse(delay));
        }
    }

    public void FalseButton() {
        Answer = true; 
        clickFalse = true;
        trueButton.GetComponent<Button>().enabled = false;
        falseButton.GetComponent<Button>().enabled = false;

        if (!currentQuestion.isTrue && clickFalse)
        {
            StartCoroutine(WaitCorrect(delay));
        }
        else
        {
            StartCoroutine(WaitFalse(delay));
        }
    }

    public  IEnumerator WaitCorrect(float delay)
    {
        yield return StartCoroutine(CoroutineUtilities.WaitForRealTime(delay-1));
        displayText.GetComponent<Text>().text = correct;
        yield return StartCoroutine(CoroutineUtilities.WaitForRealTime(delay));
        Quiz.SetActive(false);
        Time.timeScale = 1.0f;
        knight.GetComponent<ClickMove>().enabled = true;
        knight.GetComponent<Playerstat>().addHealthEnergy();
        Destroy(currentOrbReference); 
    }

    public  IEnumerator WaitFalse(float delay)
    {
        yield return StartCoroutine(CoroutineUtilities.WaitForRealTime(delay-1));
        displayText.GetComponent<Text>().text = fals;
        yield return StartCoroutine(CoroutineUtilities.WaitForRealTime(delay));
        Quiz.SetActive(false);
        Time.timeScale = 1.0f;
        knight.GetComponent<ClickMove>().enabled = true;
        Destroy(currentOrbReference); 
    }

    public  IEnumerator Counter(float delay)
    {
        for (int Count = 8; Count >= 0; Count--)
        {
            if (Answer)

            {
                StopCoroutine("Counter"); 
            }

            displayTimer.GetComponent<Text>().text = Count.ToString(); 
            yield return StartCoroutine(CoroutineUtilities.WaitForRealTime(delay));
        }
        Quiz.SetActive(false);
        Time.timeScale = 1.0f;
        knight.GetComponent<ClickMove>().enabled = true;
        Destroy(currentOrbReference); 
    }
}

using UnityEngine;
using System.Collections;
using UnityEngine.UI; 

public class QuizPrompt : MonoBehaviour {
[SerializeField]
private QuizManager quizManager;

void Start()
{
	quizManager = GameObject.Find("QuizManager").GetComponent<QuizManager>();
}
void OnTriggerEnter(Collider col)
{
    if (col.gameObject.name == "Knight")
	{
        quizManager.currentOrbReference = this.gameObject;
		quizManager.FireMe();
    }
}

}