Horizontal slider won't work

Hey ! My horizontal slider won’t move.
Here is my code :

    Sensitivity sens = new Sensitivity();
    float sensSlider = 200f;

    void OnGUI()
    {
    sens.sensitivityMove = GUI.HorizontalSlider(new Rect(Screen.width/2-(sensSlider/2),Screen.height/2-50,sensSlider,30),0.1f,1.0f,0.1f);
    }

and my Sensitivity class :

	public float sensitivityMove;
	
	public float SensitivityMove
	{
		get
		{
			return sensitivityMove;
		}
		set
		{
                        sensitivityMove = value;
		}
	}

I hope you can help.
Thanks in advance.

What are the parameters to GUI.HorizontalSlider? The first is a screen rectangle, which is all well and good.

The next three params are the current, left-most, and right-most values. You’re passing in 0.1f,1.0f,0.1f.

If you always pass in a “current” value of 0.1, the slider will always draw its thumb at that position.

If you want a thumb that moves, you need to pass a variable.

Something like this, perhaps:

sens.sensitivityMove = GUI.HorizontalSlider(new Rect(Screen.width/2-(sensSlider/2),Screen.height/2-50,sensSlider,30),sens.sensitivityMove,1.0f,0.1f);