Copy transform without being child

Hello, in my game I have my camera that is supposed to be at the same co-ordinates as my player. Because of other scripts I have the camera cannot be a child of the player, how would I copy the transform of the player and set the camera object to those parameters?

My theory is something along these lines

var target:gameObject

function Update(){

any suggestions?

at its simplest form you can simply do

Camera.main.transform.position = transform.position

//The transform of the object you want to move to
var TargetObjectTransfrom: Transform;

 function Update () {
     //Checking to make sure that there is a target transform
       gameObject.transform.position = TargetObjectTransfrom.position;