Need Javascript to propel an object toward mouse click

I’ve seen a lot of variations on this request but none of them are exactly what I need. I am new to coding so I can’t just take snipets here and there. I need a javascript that will handle the following:

A physics object will move toward the mouse click location at a constant rate of speed. After the click, the object will continue on in that direction and ignore any other clicks and just collide and interact with things as the physics dictates. I was using a script that would move the object to the exact position where the mouse clicked but that wasn’t right because it just stopped dead at that position instead of continuing to travel on.

for the traveling on mouse click, you could use something like:

var hit : RaycastHit;
var ray = Camera.main.SreenPointToRay(Input.mousePosition);

if(Physics.Raycast(ray, hit, Mathf.Infinity))
{
   Debug.Log(hit.point);
}

In that case, hit.point would return where you clicked. To make you object move towards your clicked point, use:

ObjectToMove.position = Vector.Lerp(ObjectToMove.position, hit.point, Time.deltaTime)