How do i repeat the Lerp movement?

I have a script that says when i hit pointA, lerp to pointB. It works great but when I go back to point A it wont repeat the lerp movement. Additionally, how would i set the Vector3 position to an actual gameobject, my pointA and pointB?

var pointA:Vector3;
var pointB:Vector3;
var time:float = 10.0;
var i:float = 0.0;
private var rate:float = 0.0;
var detector : ClimbDetectionScript;
var pointAobject : GameObject;
var pointBobject : GameObject;


function Update () 
{   
   MoveObject(this.transform, pointA, pointB, time);
   
}

function MoveObject (thisTransform : Transform, startPos : Vector3, endPos : Vector3, time : float) 
{
   rate = 1.0/time;
   if (i < 1.0)
	if (detector.startSpot == true)
   {
       i += Time.deltaTime * rate;
       thisTransform.position = Vector3.Lerp(startPos, endPos, i);
       
       

       
   }
}

Potential answer to your first question:

After the movement is done, maybe reassign i=0???

Can you re ask the second question please…I’m not quite understanding what your asking. You can get the Vector3 position of any gameobject in the scene as long as you have a reference to it.

Vector3 pointA = pointAObject.transform.position;