Instantiated Prefab's script doesn't work

Didn’t anyone have this problem? Please help i moved to udk just because of this problem. But udk is really hard to understand for me.

I have a prefab and a script attached to it.
When i instantiate prefab in runtime with code the script doesn’t work properly.
But when i just put the prefab in the scene without code everything works fine.

Below script is attached to a cube that is where i want the prefab’s instantiate position

public static var notarray: Array;
var timearray: Array;
public static var i=0;

//i drag the prefab here in inspector view
var ob: Transform;

function Start () {
notarray=new Array();
timearray=new Array();

notarray.Add(ob);
timearray.Add(0);
notarray.Add(ob);
timearray.Add(1);
notarray.Add(ob);
timearray.Add(1);
notarray.Add(ob);
timearray.Add(1);

while(notarray.length>i){
yield WaitForSeconds(timearray*);*

Instantiate(notarray*,transform.position,transform.rotation);*
i++;

}

}
/// This question is edited because i understood there wont be any answers, maybe this time?

Maybe you just need to put those code in to a new function other than Update() and Start(), since it have “yield”;

Here what I do:
Make a script with a public variable :Transform;

Attach that script to any object in scene, Main camera for example.

Drag the prefab you want to instantiate to the variable.

Instantiate those prefab in that script.

function YourCode()
{
  Doing Stuff  
}

function Start(){
  YourCode();
}

I solved the problem. I can’t tell how because i did a lot of things. Maybe later, i can explain it in here. So the others have this problem can solve it too…