Cannot convert 'UnityEngine.Quaternion' to 'UnityEngine.Transform'.

So someone gave me this script and he told me that there would be errors because he did it in a hurry .

var shaking : boolean = false;

var OriginalRotation : Transform;

function Update (){

    var camera = GameObject.Find("MainCamera");
    OriginalRotation=camera.transform.rotation;  **// THIS LINE**

    OriginalRotation; **// AND THIS LINE** 
    GameObject.Find("ump").animation.Play("ShootUMP");
    if(!shaking){
          CamShake ();
     
     }

thats not the enitire script though , it was just a add on . Im new to scripting thanks

I’m guessing OriginalRotation is a Transform. It should probably be a Quaternion.

Change:

var OriginalRotation : Transform;

To this:

var OriginalRotation : Quaternion;

Transform.rotation returns a Quaternion, but your variable is a Transform type.