Move Object to A point at B point wait and return to A Point

Hi !
I’ve one problem.
I want to move an object to his original position to a point B, wait for seconds then, return to original position and destroy him.

Here my code :

var endPoint : Vector3;
var duration : float = 1.0;
 
private var startPoint : Vector3;
private var startTime : float;
 
function Start() {
startPoint = transform.position;
startTime = Time.time;
}
 
function Update() {
transform.position = Vector3.Lerp(startPoint, endPoint, (Time.time - startTime) / duration);
 yield return new WaitForSeconds(70);  
 Destroy( this.gameObject );
 }

But he doesn’t work.
Some help please ? ^^

The simple way is to create a variable that control a state (moving to B, wait in B, move to A).

Or you can solve the problem using a coroutine, that is a code that executes, give control back to unity and continue from where it was.

http://unity3d.com/learn/tutorials/modules/intermediate/scripting/coroutines

It is a very basic script problem. If you didn’t expend some time learning you will be stucked in every single simple problem.