Moving an object

Hi,
I need help with moving an object, it needs to move to some position and come back in starting position, and go like that all the time, not just one time.
If someone know how to make this script pls help.

There are a lot of similar questions out there try searching for an answer before asking one.
Anyway here is what you can do:
Make a javascript and paste this:

var Speed : float = 2;
var NewPos : Vector3;
private var StartPos : Vector3;
private var GTime : float;
private var IsThere : boolean;
 
function Start () {
StartPos = transform.position;
}
 
function Update () {
if (GTime <= 1 && !IsThere) { GTime += Speed * Time.deltaTime; }
if (GTime >= 1) { IsThere = true; }
if (GTime >= 0 && IsThere) { GTime -= Speed * Time.deltaTime; }
if (GTime <= 0) { IsThere = false; }
 
transform.position.x = Mathf.Lerp (StartPos.x,NewPos.x,GTime);
transform.position.y = Mathf.Lerp (StartPos.y,NewPos.y,GTime);
transform.position.z = Mathf.Lerp (StartPos.z,NewPos.z,GTime);
}

//(Tested Code, hope it helps)

~NightmarexGR