Probleme with transform.Rotation

Hi everybody! I have a little problem that I can’t find the solution in this forum. When I try to rotate the Z of my main camera with the Z of the player, I get this error :

BCE0019: ‘Rotation’ is not a member of ‘UnityEngine.Transform’.

Here is my code :

#pragma strict

var target : Transform;

function Start () {
    if (target.position.x < -4.605496)
        transform.position.x = -4.605496;
    else if (target.position.x > -1.86912)
        transform.position.x = -1.86912;
}


function Update(){
     transform.Rotation(0, 0, target.rotation.z, Space.World);
     if (target.position.x > -4.605496 && target.position.x < -1.86912)
         transform.position = new Vector3(target.position.x, target.position.y, target.position.z);
}

Everybody use the Rotation function this way… Even in the Unity API. I don’t really understand the problem here.
Can someone help me there? Thank you!

Did you intend to use the Rotate() method or do you want to set rotation, which is a class variable that takes a quaternion? There is no Rotation() method for transform.

You can see this function in the API of Unity

Maybe I use it in a wrong way?

EDIT:

Omg, Yea your right, it’s Rotate! My bad, thank you. Sorry for that bad mistake :confused: