Slider not disabling

I am working on an RPG, but the options are busted. There are two sliders for now; text speed and camera size. when I call “SetActive(false);” it hides, but it can still be moved. I am confused, and this is my code. Please help me.

public class Menu : MonoBehaviour
{

public static int lastspot;

public static bool outdoors;
public static bool Inventory;
public static bool start = false;
public bool pause = false;

public static string scene = "Start";

public GameObject panel;
public GameObject save;
public GameObject back;
public GameObject InvBut;
public GameObject opt;
public GameObject back2;
public GameObject InvenPanel;
public GameObject ItemList;
public GameObject Back3;
public GameObject textSliderFill;
public GameObject textSliderKnob;
public GameObject textSliderBackground;
public GameObject camSliderFill;
public GameObject camSliderKnob;
public GameObject camSliderBackground;


public TextMeshProUGUI textSpeedText;
public TextMeshProUGUI camSizeText;


public MOvement movement;
public NPC npc; 

public void Options()
{
    scene = "Options";
    outdoors = false;
    SceneManager.LoadScene("Options Menu");
     InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
    textSliderKnob.SetActive(false);
    textSliderBackground.SetActive(false);
    
    textSpeedText.text = "";
    camSliderFill.SetActive(false);
    camSliderKnob.SetActive(false);
    camSliderBackground.SetActive(false);
    
    camSizeText.text = "";
}

public void Pause()
{
    outdoors = false;
    lastspot = 0;
    pause = true;
    panel.GetComponent<Image>().enabled = true;
    save.GetComponent<Image>().enabled = true;
    back.GetComponent<Image>().enabled = true;
    opt.GetComponent<Image>().enabled = true;
    back2.GetComponent<Image>().enabled = false;
     InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = true;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
    textSliderKnob.SetActive(false);
    textSliderBackground.SetActive(false);
    textSpeedText.text = "";
    camSliderFill.SetActive(false);
    camSliderKnob.SetActive(false);
    camSliderBackground.SetActive(false);
    
    camSizeText.text = "";
} 

public void Pausoutside()
{
    outdoors = true;
    lastspot = 0;
    pause = false;
    panel.GetComponent<Image>().enabled = false;
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = false;
    InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
    textSliderKnob.SetActive(false);
    textSliderBackground.SetActive(false);
     
    textSpeedText.text = "";
    camSliderFill.SetActive(false);
    camSliderKnob.SetActive(false);
    camSliderBackground.SetActive(false);
    
    camSizeText.text = "";
    
} 

public void PauseOptions()
{
    panel.GetComponent<Image>().enabled = true;
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = true;
     InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = false;
    outdoors = false;
    pause = true;
    textSliderFill.SetActive(true);
    textSliderKnob.SetActive(true);
    textSliderBackground.SetActive(true);
     
    textSpeedText.text = "Text Speed";
    camSliderFill.SetActive(true);
    camSliderKnob.SetActive(true);
    camSliderBackground.SetActive(true);
    
    camSizeText.text = "Camera Zoom";
}

public void p2P()
{
    outdoors = true;
    pause = false;
    panel.GetComponent<Image>().enabled = false;
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = false;
     InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = true;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
    textSliderKnob.SetActive(false);
    textSliderBackground.SetActive(false);
      
      
    textSpeedText.text = "";
    camSliderFill.SetActive(false);
    camSliderKnob.SetActive(false);
    camSliderBackground.SetActive(false);
    
    camSizeText.text = "";
}

public void Startmen()
{
    
    lastspot = 1;
    
    
    panel.GetComponent<Image>().enabled = false;
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = false;
    InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
    textSliderKnob.SetActive(false);
    textSliderBackground.SetActive(false);
      
    textSpeedText.text = "";
    camSliderFill.SetActive(false);
    camSliderKnob.SetActive(false);
    camSliderBackground.SetActive(false);
    
    camSizeText.text = "";
}

public void OutSide()
{   
    SceneManager.LoadScene("OutDoors");
    panel.GetComponent<Image>().enabled = false;
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = false;
    InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
    textSliderKnob.SetActive(false);
    textSliderBackground.SetActive(false);
      
    textSpeedText.text = "";
    camSliderFill.SetActive(false);
    camSliderKnob.SetActive(false);
    camSliderBackground.SetActive(false);
    
    camSizeText.text = "";
    outdoors = true;
    movement.BACKOUT();
   
    scene = "Outside";
}

public void InventoryMenu()
{
    
    textSliderFill.SetActive(false); 
    textSliderKnob.SetActive(false);
    textSliderBackground.SetActive(false);
      
    
    camSliderFill.SetActive(false);
    camSliderKnob.SetActive(false);
    camSliderBackground.SetActive(false);
    
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = false;
    InvenPanel.GetComponent<Image>().enabled = true;
    ItemList.GetComponent<Image>().enabled = true;
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = true;
    panel.GetComponent<Image>().enabled = true;
    camSizeText.text = "";
    textSpeedText.text = "";
}

private void Start() 
{
    
    if (start == false)
    {
        outdoors = false;
        Startmen();  
        start = true;  
    }

    
}

public void OpBack()
{
    Startmen();

}

void Update() 
{
    if(Input.GetKey("p"))
    {
        
        
         
            Pause();
            outdoors = false;
        
           
        
        
    }
}

}

Never mind, I found the problem. I was disabling each part of the slider. This removed the image, but the slider script was on the slider game object, so although the parts of it were disabled, the slider still functioned.
This is the new script:

public class Menu : MonoBehaviour
{

public static int lastspot;

public static bool outdoors;
public static bool Inventory;
public static bool start = false;
public bool pause = false;

public static string scene = "Start";

public GameObject panel;
public GameObject save;
public GameObject back;
public GameObject InvBut;
public GameObject opt;
public GameObject back2;
public GameObject InvenPanel;
public GameObject ItemList;
public GameObject Back3;
public GameObject textSliderFill;

public GameObject camSliderFill;




public TextMeshProUGUI textSpeedText;
public TextMeshProUGUI camSizeText;


public MOvement movement;
public NPC npc; 

public void Options()
{
    scene = "Options";
    outdoors = false;
    SceneManager.LoadScene("Options Menu");
     InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
   
    
    
    textSpeedText.text = "";
    camSliderFill.SetActive(false);
    

    
    camSizeText.text = "";
}

public void Pause()
{
    outdoors = false;
    lastspot = 0;
    pause = true;
    panel.GetComponent<Image>().enabled = true;
    save.GetComponent<Image>().enabled = true;
    back.GetComponent<Image>().enabled = true;
    opt.GetComponent<Image>().enabled = true;
    back2.GetComponent<Image>().enabled = false;
     InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = true;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
   
    
    textSpeedText.text = "";
    camSliderFill.SetActive(false);
    
 
}
public void Pausoutside()
{
    outdoors = true;
    lastspot = 0;
    pause = false;
    panel.GetComponent<Image>().enabled = false;
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = false;
    InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
   
    
     
    textSpeedText.text = "";
    camSliderFill.SetActive(false);
    

    
    camSizeText.text = "";
    
} 

public void PauseOptions()
{
    panel.GetComponent<Image>().enabled = true;
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = true;
     InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = false;
    outdoors = false;
    pause = true;
    textSliderFill.SetActive(true);
    
    
     
    textSpeedText.text = "Text Speed";
    camSliderFill.SetActive(true);
    
    
    
    camSizeText.text = "Camera Zoom";
}

public void p2P()
{
    outdoors = true;
    pause = false;
    panel.GetComponent<Image>().enabled = false;
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = false;
     InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = true;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
   
    camSliderFill.SetActive(false);
      
      
    textSpeedText.text = "";
    
    
    camSizeText.text = "";
}

public void Startmen()
{
    
    lastspot = 1;
    
    
    panel.GetComponent<Image>().enabled = false;
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = false;
    InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
   
    
      
    textSpeedText.text = "";
    camSliderFill.SetActive(false);
    

    
    camSizeText.text = "";
}

public void OutSide()
{   
    SceneManager.LoadScene("OutDoors");
    panel.GetComponent<Image>().enabled = false;
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = false;
    InvenPanel.GetComponent<Image>().enabled = false;
    
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = false;
    textSliderFill.SetActive(false); 
   
    
      
    textSpeedText.text = "";
    camSliderFill.SetActive(false);
    

    
    camSizeText.text = "";
    outdoors = true;
    movement.BACKOUT();
   
    scene = "Outside";
}

public void InventoryMenu()
{
    
    textSliderFill.SetActive(false); 
   
    
      
    
    camSliderFill.SetActive(false);
    

    
    save.GetComponent<Image>().enabled = false;
    back.GetComponent<Image>().enabled = false;
    opt.GetComponent<Image>().enabled = false;
    back2.GetComponent<Image>().enabled = false;
    InvenPanel.GetComponent<Image>().enabled = true;
    ItemList.GetComponent<Image>().enabled = true;
    InvBut.GetComponent<Image>().enabled = false;
    Back3.GetComponent<Image>().enabled = true;
    panel.GetComponent<Image>().enabled = true;
    camSizeText.text = "";
    textSpeedText.text = "";
}

private void Start() 
{
    
    if (start == false)
    {
        outdoors = false;
        Startmen();  
        start = true;  
    }

    
}

public void OpBack()
{
    Startmen();

}

void Update() 
{
    if(Input.GetKey("p"))
    {
        
        
         
            Pause();
            outdoors = false;
        
           
        
        
    }
}

}