Editing variables of instantiated prefabs

Hello all, I am trying to create a “zoom” function when a prefab is clicked on (in another script, it places multiple ones in a row on the screen, named obj0, obj1, etc). There are a few major problems I am having, perhaps someone could help me out in fixing/understanding it? Questions are comments in the script starting with Q:

Code’s unityscript

var endPoint : Vector3;
endPoint = Vector3 (15.5, 26.75, 15);
// Q: I do not know why I need to declare endPoint and assign a value on different lines, but it won't change the values in the instantiated prefabs if I don't
var startPoint : Vector3;
var isMoving : boolean;

function Update () {
var hit : RaycastHit;
var itsaray : Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast (itsaray, hit)  Input.GetMouseButtonDown(0)  !isMoving) {  
	var transform : Transform = hit.collider.GetComponent(Transform);
	// Q: I do not know what the variable has to be 'transform'. I tried changing it in this line and the line below, and it wouldn't work. Care to explain?
	if (transform) {
		startTime = Time.time;
		startPoint = transform.position;
		// Q: Changing these three variables sets all the instantiated prefabs to these values, rather than just the one tested
		isMoving = true;
	}
}
if (isMoving) {
	transform.position = Vector3.Lerp(startPoint, endPoint, Time.time - startTime);
	// Q: Two problems, one I can't call variables startPoint/endPoint beause they don't have a reference, and two if I tweak it so it does work the jump happens instantly; how can I slow this down to take X time?
}
	if (transform.position == endPoint) {
		// Q: This call doesn't work at all, for the same reasons as Lerp didn't work earlier.
		isMoving = false;
	}
}

I’m new to unityscript so a few of these might be obvious but I couldn’t find any real answers online to this varibale question, so thanks in advance!

I think there is a rule on bumping, but I have made progress, fixed code:

function Start()
{
    StartCoroutine("CoStart");
}

function CoStart() : IEnumerator
{
    while (true)
        yield CoUpdate();
}

function CoUpdate() : IEnumerator
{
	var hit : RaycastHit;
	var itsaray : Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
	Debug.DrawRay (itsaray.origin, itsaray.direction * 200, Color.yellow);
	if (Physics.Raycast (itsaray, hit)  Input.GetMouseButtonDown(0)) {  
		if (this.name == hit.collider.gameObject.name) {
			yield MoveObject.use.Translation(transform, Vector3(15.5, 26.75, 15), 1, MoveType.Speed);
		}
	}
}

So now it only instances the correct object, and I gained the ability to yield in essentially an update. I am attempting to use http://www.unifycommunity.com/wiki/index.php?title=MoveObject to move my object to a new vector position in a second, but I am receiving this error:

NullReferenceException: Object reference not set to an instance of an object
Scale_UP+$CoUpdate$6+.MoveNext () (at Assets/Scale_UP.js:31) UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator) :MoveNext() (at Assets/Scale_UP.js:17)

I am assuming this is caused by the transform in the MoveObject script, but I cannot figure out the correct syntax. Can anyone help me?