AddForceAtPosition not working?

What im trying to do is make a fps and make a raycast be the bullet. The problem is when i use addforceatposition it says the point isnt part of unity.transform? Look!

function update()
{

if(Input.GetMouseButton(0))

{
var forward = transform.TransformDirection(Vector3.forward);

var hitInfo : RaycastHit;

if (Physics.Raycast (transform.position, forward, hitInfo, 1000)) 
{hitInfo.rigidbody.AddForceAtPosition (hitInfo.transform.point,forward * 50);

}
}
}

Can anyone help me with this? Thanks!

It says the point isnt part of transform

Right you are, a transform doesn't have a point member. It does have a position member, though. Maybe you want to add the force at the hitInfo.point instead?

hitInfo.rigidbody.AddForceAtPosition(hitInfo.point, forward * 50);