Sensitivity Help? || Scope Zoom

Hey guys! Cody here. It seems I am having a few issues. I created a scope on a sniper to get the basics down and I am using the FOV cam. I was wondering if there was a way to modify the zoom so while im zoomed in the sensitivity goes down to about 2 or 3. Heres my script. Feel free to modify or make any changes. Thanks to anyone who helps!

using UnityEngine;
using System.Collections;

/// MouseLook rotates the transform based on the mouse delta.
/// Minimum and Maximum values can be used to constrain the possible rotation

/// To make an FPS style character:
/// - Create a capsule.
/// - Add the MouseLook script to the capsule.
///   -> Set the mouse look to use LookX. (You want to only turn character but not tilt it)
/// - Add FPSInputController script to the capsule
///   -> A CharacterMotor and a CharacterController component will be automatically added.

/// - Create a camera. Make the camera a child of the capsule. Reset it's transform.
/// - Add a MouseLook script to the camera.
///   -> Set the mouse look to use LookY. (You want the camera to tilt up and down like a head. The character already turns.)

[AddComponentMenu("Camera-Control/Mouse Look")]

public class mouseLookAndHide : MonoBehaviour {

	public enum RotationAxes { MouseXAndY = 0, MouseX = 1, MouseY = 2 }
	public RotationAxes axes = RotationAxes.MouseXAndY;
	public float sensitivityX = 15F;
	public float sensitivityY = 15F;

	public float minimumX = -360F;
	public float maximumX = 360F;

	public float minimumY = -60F;
	public float maximumY = 60F;

	float rotationY = 0F;
	public bool showingMouse;

	void Update ()
	{
		
		//if you press "r" and the mouse is not shown then the mouse is shown and movable then execute code
		if(Input.GetKeyDown(KeyCode.M) && showingMouse == false){
			showingMouse = true;
			Screen.showCursor =true;
			Screen.lockCursor = false;
		}
//if you press "r" and the mouse is shown then make it not shown
		else if(Input.GetKeyDown(KeyCode.M) && showingMouse == true){
		showingMouse = false;
		Screen.showCursor =false;
		Screen.lockCursor = true;
		}
		
		
		if (axes == RotationAxes.MouseXAndY)
		{
			float rotationX = transform.localEulerAngles.y + Input.GetAxis("Mouse X") * sensitivityX;
			
			rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
			rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
			
			transform.localEulerAngles = new Vector3(-rotationY, rotationX, 0);
		}
		else if (axes == RotationAxes.MouseX)
		{
			transform.Rotate(0, Input.GetAxis("Mouse X") * sensitivityX, 0);
		}
		else
		{
			rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
			rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
			
			transform.localEulerAngles = new Vector3(-rotationY, transform.localEulerAngles.y, 0);
		}
	}
	
	void Start ()
	{		
		showingMouse = false;
		Screen.showCursor = false;
		Screen.lockCursor = true;
		
		// Locks in center of screen, Hides cursor
	//Screen.lockCursor = true;	
	//Screen.showCursor = false;

		// Make the rigid body not change rotation
		if (rigidbody)
			rigidbody.freezeRotation = true;
	}
}

Also I know the code is the original I just implemented some of my own things. Thanks!

Hey Cody! I’m back, and I have the script. In this script you zoom in with the right-mouse button, and when it zooms in the sensitivity changes from 15f, to 5f, and back when you let go of right-click.

Edit: I’ve added a link to the assets package at the bottom of my answer.

Here’s the code in C#:

using UnityEngine;
using System.Collections;

public class Scope : MonoBehaviour {

	public int zoom;
	public int normal;

	public float smoothDamp;

	public bool isZoomed;

	private float sensitivityX;
	private float sensitivityY;

	void Update () {
	
		if(Input.GetMouseButton(1)){
			isZoomed = true;
		
			if(isZoomed == true) {
				camera.fieldOfView = Mathf.Lerp(camera.fieldOfView, zoom, smoothDamp * Time.deltaTime);
				sensitivityY = gameObject.GetComponent<MouseLookAndHide>().sensitivityX = 5f;
				sensitivityY = gameObject.GetComponent<MouseLookAndHide>().sensitivityY = 5f;
			}
		}
	
		if(!Input.GetMouseButton(1)) {
			isZoomed = false;
		
			if(isZoomed == false) {
				camera.fieldOfView = Mathf.Lerp(camera.fieldOfView, normal, smoothDamp * Time.deltaTime);
				sensitivityY = gameObject.GetComponent<MouseLookAndHide>().sensitivityX = 15f;
				sensitivityY = gameObject.GetComponent<MouseLookAndHide>().sensitivityY = 15f;

			}
		}
	}
}

Or, you can just download the Unity scripts and scene from my project folder, here:
[23088-codymoores+scope+package.zip|23088]