Attaching a joint on the instantiated object and connecting it with the collided object.

I am trying to instantiate an object which is going to be connected to the object it hit, the problem is that I don’t know how to execute this in the following script that I have made. It shows an error at line 13: BCE0020: An instance of type ‘UnityEngine.Joint’ is required to access non static member ‘connectedBody’.

I have a feeling that even if that error is dealt with, the script is probably wrong either way.

var ImpactSite: GameObject;

function OnCollisionEnter(collision : Collision) {
        for (var contact : ContactPoint in collision.contacts)
	 var normal = contact.point - contact.otherCollider.transform.position;
     var q = Quaternion.FromToRotation(Vector3.up, normal);
     Instantiate(ImpactSite, contact.point, q);
     var otherBody = contact.otherCollider.gameObject.Rigidbody;
     FixedJoint.connectedBody = otherBody;

Try using a hingeJoint instead