MouseLook - Min & Max Problem


I have a first person controller in the scene, and I'm struggling to have a restriction in which direction to look in. I've added restriction to the Y axis so I can only loop up 40, and down -40. But on the X - the camera keeps spinning all the away round no matter what Minimum or Maximum restriction I put on it ... Am I doing something wrong?

I've also deactivated the Character Motor (I don't want the character to move - only the head ... and a head can't turn 360 by its self -- this is what I'm trying to fix)

Any help would be much appreciated.


The MouseLook script is on two different objects. This is because X rotation rotates the whole thing, Y rotation only makes the camera look up and down.

I have debug the script;