Instantiate a prefab and parenting it?

Hello there,
I’m having trouble with instantiating a prefab and making it a child of the object that it hits. This is the error that Unity gives to me :

“Setting the parent of a transform
which resides in a prefab is disabled
to prevent data corruption.
UnityEngine.Transform:set_parent(Transform)
Bullet:Update() (at
Assets/Script/Bullet.js:39)”

and this is part of the script “interested” :

var HitHole : GameObject;
var power : int;
var HitParticleSpacing : float = 0.01;

function Update () 
{

var fwd = transform.TransformDirection(Vector3.forward);
var Hit : RaycastHit;
       if (HitHole)
       
          {
          Instantiate(HitHole, Hit.point + (Hit.normal * HitParticleSpacing), Quaternion.LookRotation(Hit.normal));
          
          HitHole.transform.parent = transform;
          
       if (Hit.rigidbody !=null)
     
               Hit.rigidbody.AddForceAtPosition(fwd * power, Hit.point);
        
          }
}

I’ve someone can help me , I just don’t know what’s my error!

You’re trying to modify the prefab HitHole! Assign the result of Instantiate to a temporary variable and use it to modify the instance created, not the prefab:

   ...
   if (HitHole){
       // get a reference to the newly created object:
       var hole = Instantiate(HitHole, Hit.point + (Hit.normal * HitParticleSpacing), Quaternion.LookRotation(Hit.normal));
       // "glue" hole to the object hit:
       hole.transform.parent = Hit.transform;
       if (Hit.rigidbody !=null)
           Hit.rigidbody.AddForceAtPosition(fwd * power, Hit.point);
       }
   }
   ...