Raycast Hit Question

I can’t seem to get this to work, what I’m trying to do is get the gameObject to add force in the direction of the hit point of the raycast which is being casted from the mosue position, however nothing I have tried so far works. Here’s my code:

        if (Input.GetButton ("Fire1")) {

        var ray : Ray = Camera.main.ScreenPointToRay (Input.mousePosition);
        var hit : RaycastHit;
        if (Physics.Raycast (ray, hit, Mathf.Infinity)) {
         var newVector3 = hit.point;
            var moveDir = transform.position - newVector3;

            rigidbody.AddForce (moveDir * speed);

Well the direction of the hit is the direction of the ray - which you can get from ray.direction. Or are you thinking you want to take the direction from something else? in which case your moveDir logic is backwards right now and you probably want to do a .normalized on it.

   var moveDir = (hit.point - transform.position).normalized;