Disable a script when another is active

So I have got two scene change scripts, both which are attached to two different game objects. But for some reason, one script affects both game objects. So I am trying to temporarily disable one of the scripts when the other script is active on the other game object. Here is what I have but this is returning the error, “BasketballSceneChange’ is a type, which is not valid in the given context”.

void Update()
{
    **GameObject.Find("pPrism1").GetComponent(BasketballSceneChange).enabled = false;**

    if (Input.GetMouseButtonDown(0) &&  SceneManager.GetActiveScene().name == "MWalk")
    {
        SceneManager.LoadScene("SWalk");
     
    }

    if (Input.GetMouseButton(0) && SceneManager.GetActiveScene().name == "SWalk")
    {
        SceneManager.LoadScene("Football");

    }

    if (Input.GetMouseButton(0) && SceneManager.GetActiveScene().name == "Basketball")
    {
        SceneManager.LoadScene("BWalk");

    }

    if (Input.GetMouseButton(0) && SceneManager.GetActiveScene().name == "BWalk")
    {
        SceneManager.LoadScene("MWalk");

Why just dont create a bool variable and check it vai “if” at the begining of each “LoadScene” to allow/prevent all the script to execute when you want?

You know, i supose you have 2 diferent scripts because player can go to 2 different scenes. So there are some things to decide which scene can be loaded.

Bye :smiley: