var target : GameObject;
var script1Obj : GameObject;
private var script1 : Script1;
function Start () {
script1 = script1Obj.GetComponent(Script1);
target = script1.object;
}
Set script1Obj to the gameObject on which Script1 is attached, and set make sure to change all references to ‘Script1’ within the script to whatever the actual name of that script is.