Js Object following rotation of another object

I want one object to rotate the same as another object, however instead of reflecting the exact rotation it just spins

Notes:

  • Neither object has a rigidbody

  • Both are children of different parent objects

    function Update ()
    {
    var rotation = GameObject.Find(“Mechintosh_Head”).transform.eulerAngles.y;
    transform.Rotate(0, rotation, 0);
    }

Ok so when you use Rotate the thing actually moves that amount! What you want to do is set the rotation like this:

     private var head : Transform;

     function Start() {
          head = GameObject.Find("Mechintosh_Head").transform;
     }

     function Update() {
          transform.eulerAngles.y = head.eulerAngles.y;
     }