Shooting Towards mouse Cursor

I have a sphere in my game that follows the cursor and rotates around my player, but how would I have it so when I press the mouse button (Input.GetMouseButton(0)) is clicked, it fires to the position of the cursor? I’m confused on how to actual move it. I’ve looked around on here but didn’t find anything that worked for me. My bullet prefab is also a rigidbody. Here’s how I find the position of the mouse in my 2d game world (X-axis & Y-axis):

var plane = Plane(transform.position, Vector3.up);    
var ray = Camera.main.ScreenPointToRay(Input.mousePosition);    
var distance: float;
if (plane.Raycast(ray, distance)){        
      hitPoint = ray.GetPoint(distance);
      hitPoint.z = -19;
    }

This is all done in the function Update(). Thank you for your help.

I had a similar problem, although I was not looking for the object to go to where the mouse is. This is what I came up with however.

    var bullet : Rigidbody; 
    var speed : float = 10.0f;
    var muzzlePoint : Transform;

function Update() {
    if(Input.GetButtonDown("Fire1")) {
    bullet.useGravity = false;
        var instance : Rigidbody = Instantiate(bullet, muzzlePoint.position, muzzlePoint.rotation);
        instance.velocity = muzzlePoint.forward * 50;
    }
}

I hope this helps.