To change object Position Smoothly

hey Firends!
i am working on a game in which i want my object to change its position verticaly after trigger. i have done this, but when it is triggered it jump suddnely. i want it to change its position smoothly using some time
And Here is my Code

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class Target : MonoBehaviour {
	// Use this for initialization
	public Text text;
	public int maxHits = 3;
	public int CountScore=0;
	public float moveAmount;
	public Vector2 TargetPosition;
	public Ball ball; 
	static float t = 0.0f;
	void Start(){
		TargetPosition = transform.position;
		Debug.Log ("first position" + TargetPosition);
	}
	void OnTriggerEnter2D (Collider2D Collision) {
		CountScore++;
		Debug.Log (CountScore);
		//Moving Target position According to hits
		if (maxHits!=null) {
			TargetPosition.y += moveAmount;
			MoveTargetPosition ();
			maxHits--;
		}
	}
	//move target function
	void MoveTargetPosition(){
		Debug.Log ("my position" + TargetPosition);
		transform.position = new Vector2(TargetPosition.x, this.TargetPosition.y);
		}
}

Please help and thanx in Advance.

Maybe the Vector3.Lerp(vectorA, vectorB, t) function is what you are looking for? The parameter t is a value between 0 and 1, where the Lerp function returns vectorA for t=0 and vectorB for t=1 and something inbetween (linear) for inbetween t values. The t value could then be computed using Time functions.

Thanx For Your Time
it Did’nt Worked. the object moves same like before. it jumps suddenly.
i want to move the object smothly within a duration