How do i make a mouse look clamp?

I need to make a clamp on my maincamera so that my head does not do somersaults verticaly(Mouse Y) Please help

P.S its in javascript

#pragma strict

var lookSpeed = 10.0;
var lookrange = 60.0;
var currentRotation;

function Start () {
//currentRotation = GetComponent.transform.rotation;

function Update () 

//currentRotation * Mathf.Clamp * lookrange -= +=;
var look = Input.GetAxis("Mouse Y") * lookSpeed;
transform.Rotate(-look, 0, 0);


I’m guessing (w/o more to work with) that you need to adjust the Mouse Look script values attached to your player or camera. If you have the Mouse Look script on your camera, look at max/min Y and adjust.