Script not registering my toggle selection

I started the text with it disabled which works, but its not being enabled after selecting a toggle option. Enabling it on my OnSubmit() function didn’t work either, the text on the next scene is still disabled. Even though all the debug lines do work.

Lines 51 and 57

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using System;


//check a box if you want easy, normal, hard, or crazy and have it show the money amount in-game (on the next scene)


public class ChooseDifficulty : MonoBehaviour
{

    //Toggle game objects. //use public toggle instead of public GameObject for the toggles
    public Toggle isEasy;
    public Toggle isNormal;
    public Toggle isHard;
    public Toggle isCrazy;

 
    public GameObject textObjectEasy;
    public GameObject textObjectNormal;

 


private void Awake()
    {
       DontDestroyOnLoad(textObjectEasy.gameObject);

    }

    public void Start()
    {

    

        textObjectEasy.gameObject.SetActive(false);
        textObjectNormal.gameObject.SetActive(false);


    }

    //check active toggle
    public void ActiveToggle()
    {
        if (isEasy.isOn)
        {
            Debug.Log("Player selected easy");
            textObjectEasy.gameObject.SetActive(true);

        }
        else if (isNormal.isOn)
        {
            Debug.Log("Player selected normal");
            textObjectNormal.gameObject.SetActive(true);
        }
        else if (isHard.isOn)
        {
            Debug.Log("Player selected hard");
        }
        else if (isCrazy.isOn)
        {
            Debug.Log("Player seleced crazy");
        }
    }


public void OnSubmit() //our button
    {
        //SUBMITTING DIFFICULTY SELECTION
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
        Debug.Log("Difficulty selected");
     

       //textObjectEasy.gameObject.SetActive(true);
        //check active toggle through function
        ActiveToggle();

    }
}

You would need to have the object the script is attached to DontDestroyOnLoad. I usually have a GameManager script that does all this, store the information in either a couple of bools or an enum. Then when the next scene loads a script gets the information from the GameManager as to what to show.

Right now ActiveToggle() is being called on the current scene, not the one you are loading. For that you need a coroutine to wait for the scene to load, but the object would get destroyed before that as you don’t have DontDestroyOnLoad on the object the script is attached to.

When I start the text enabled (line 39), it won’t disable when I change line 51 to false. No idea why. I did that just to see if the toggle was registering even though the debug said it is.

Maybe call ActiveToggle() before the call to load the scene.

that didnt work either.

Where should the co-routine go? On scene 1 (game set up screen) or scene 2 (goes to this scene after hitting the submit button)? The text is on scene 2.