Assigning a prefab via Code

I am attempting to create an enemy (a squirrel that throws nuts) that I can import to a friend’s project. The squirrel itself works fine, but every time I place a new one I have to re-assign the Projectile variable via the inspector. I’ve been trying to get around this with code, but it can only copy an existing object and not the prefab. Am I doing this correctly?

var ProjectileAcorn : GameObject;
function Start(){

ProjectileAcorn = GameObject.Find("Squirrel_Acorn");
}

function Update(){
if(timer==15 && aware == 1)
{
var instanceAcorn = Instantiate(ProjectileAcorn, position, rotation);}}

The nut has a separate script for moving, animating, impact, etc.

You shouldn’t have to use code to do it, or need to reassign the projectile every time you make one.

If you have made a squirrel prefab in the project panel, and an acorn prefab there also ; then drag/dropped the acorn prefab onto the squirrel prefab’s projectile slot – every copy/duplicate/instance of that squirrel prefab that you put into your scene/hierarchy should already have that same acorn projectile assigned to it.