Making a target move when hit

I have a target that when hit sends the appropriate score to the ui, but when the target gets hit I also want it to wait for a couple seconds, then move down (which would be out of sight behind a wall), wait several more seconds and then move back up to the same position. I however don't have any idea how to make it move :(

This is the code I have so far, which waits for 3 seconds when hit, but after that I'm stumped.

function OnCollisionEnter (col : Collision) {

yield WaitForSeconds(3);

}

So what I need is code to get the initial position of the object, move it a set distance(directly down), then move it back up to the initial position(directly up). Thanks for any help!

I don't know Javascript, so this is going to be in C#, but I think it will be easy enough to understand that you can convert it.

You need to start a coroutine when it gets hit to do everything you want.

void OnCollisionEnter(Collision other)
{
     StartCoroutine(CollisionEvents());
}

IEnumerator CollisionEvents()
{
     // Send score here
     yield return new WaitForSeconds(1);
     // Hide here
     yield return new WaitForSeconds(5);
     // Show here
}

Animating the position would be the easiest. First link the object to an empty gameObject, this is done because when you animate something the object will use those exact coordinates every time it plays so if you move the object or created a duplicate it will snap to those coordinates once played, but when it's linked to another object first it zeros out the x,y,z and uses the local coordinates so you can move it if you want. Select the animated object and open the animation window, then animate it moving down, then make another animation moving from down to the up position.

var animateObject : GameObject;

function OnCollisionEnter (col : Collision) {

yield WaitForSeconds(1);
   animateObject.animation.Play("upPOS-downPOS");

yield WaitForSeconds(3);
   animateObject.animation.Play("downPOS-upPOS");
}
function OnCollisionEnter (col : Collision) {

yield WaitForSeconds(3);
transform.position -= Vector3.up;
yield WaitForSeconds(3);
transform.position += Vector3.up;

}

moves 1m down after 3 seconds, then 1m up after 3 more seconds (added as an alternative to the good animation answer above)