Rotating a bone in Z axis.

Hello Everyone.
I’m pretty new at unity and new on this Community. I just want to know how to rotate a bone of a 3rd Person animated character, I want the char to look up and down by moving the mouse up and down.
I have this script so far, and works perfect with X and Y axes but on Z:

var spine : Transform;    
var spineControl = 0.9;
private var currentDirection = Vector3.forward;

function LateUpdate ()    {
   
   	currentDirection.z = Mathf.Clamp(currentDirection.z + Input.GetAxis("Mouse Y"), -2, 2);
   	var rotation : Quaternion = Quaternion.LookRotation(currentDirection);
   	spine.localRotation = Quaternion.Lerp(spine.localRotation, rotation, spineControl);


    }

Thanks for your help.

//A preview of my first work on unity: - YouTube

hi, i use this script for rotate a bone of my 3rd character and work nice i hope this work
nice for you:

     var bone:GameObject;

     private var z:float=0;
     private var ySpeed:float=10;
     private var zMinLimit:float= -40.0;
     private var zMaxLimit:float= 20.0; 

     function Update()
     {
     
          z -= Input.GetAxis("Mouse Y") * ySpeed * 0.02f;
     
          z = ClampAngle(z, zMinLimit, zMaxLimit);
    
          Quaternion rotation_bone= Quaternion.Euler(0, 0, z);
    
          bone.transform.localRotation = rotation_bone;
     }

     static function ClampAngle (float angle, float min, float max) 
     {
	  if (angle < -360)
		    angle += 360;
	  if (angle > 360)
		    angle -= 360;
	  return Mathf.Clamp (angle, min, max);
     }

Hi, i know this is old but just in case people still look into this, im new in unity and is making a 3rd person character i made a similar code before but it had the same results as this code. my character seems to be tilting side ways instead of up and down is there anyway to fix this? im really desperate :frowning:
124990-ewew.png