translate ..... .. .

I want to translate a game object from one position to another at speed v and then return to its original position at speed v/2 and then repeat everything again (just like a back and forth movement).Any help would be greatly appreciated?

You Should do something like this -

var speed = 5;

function Update ()
{

   //This will check if your object's position is (0,0,0).

   if(transform.position == Vector3(0,0,0))
   {

      //Lets move your object.

      transform.Translate(speed * Time.deltaTime,0,0);

   }

   //This will check if your objects position is (10,0,0).

   if(transform.position == Vector3(10,0,0))
   {

   //Lets move your object back but slower, like you want.

   transform.Translate(-speed/2 * Time.deltaTime,0,0);

   }

}