Can I stop the prefab connection of a gameobject during play?

Ok I’m making a FPS and I’m trying to make a script that will allow the player to pick up weapons off the floor. I do this by instantiating the weapon in front of the player and parenting the weapon to the player. Every thing work’s fine but when I made the weapon a prefab it didn’t work and an error message came up and it said something like “parenting a prefab is disabled to prevent data corruption”. So my solution is to break the connection of the prefab in the awake function? But I don’t know how to stop the prefab connection. Anything will help thanks!

var weaponHoldPoint : Transform;
var pistol : Transform;
var assualt : Transform;

function Start ()
{
    Instantiate(pistol, weaponHoldPoint.position, transform.rotation);
    pistol.transform.parent = transform;
}

Like i thought you are not using the clone. You try to parent the prefab directly!

Instantiate() returns the cloned object. prefab is just the source object. You should do it like this:

var weaponHoldPoint : Transform;
var pistol : Transform;
var assualt : Transform;

function Start ()
{
    var clone : Transform = Instantiate(pistol, weaponHoldPoint.position, transform.rotation);
    clone.parent = transform;
}

You should take a look into the manual for Instantiate