Camera Zoom controlled by Slider

So I am attempting to make a simple viewer in Unity. I am looking to have a vertical slider control the zoom of the camera and a horizontal camera control the rotation.

Currently I have the c# code to draw the vertical slider in the GUI layer and it controls the field of view. However, instead of the vSliderValue starting at 60 it starts at 0. So when I test the program I start off with a blank screen with a vertical slider bar. When I move the slider the camera will then jump to a value where i can see my scene.

Any thoughts as to why the camera wont start at 60?

Thanks.

public class Slider : MonoBehaviour {

	public float vSliderValue = 60f;

	void Update (){
		
		checkCamZoom();
		
	}
	
	void OnGUI () {

		vSliderValue = GUI.VerticalSlider (new Rect (25, 25, 10, (Screen.height-100)), vSliderValue, 80f, 40f);

	}

	void checkCamZoom (){

		camera.fieldOfView = vSliderValue;

	}

}

Most likely culprit: What value does vSliderValue show in the object’s inspector? If the member was uninitialized in an earlier version of the script, the uninitialized value (0) could have gotten “locked in” when you added the component to your GameObject. If so, just change the value in the inspector (or right click on component → Reset should reset it to the new default value of 60, I think).

Thanks StarManta. I just figured that out. I ended up just setting the float to private so it will just change from the script!