Instantiate Object

I’m trying to make a clone of these arcade games where you need to hit some object that appears(sorry for my shitty explanation) this img shows better what I’m trying to do:


I’ve made this code to control the holes:

#pragma strict

var bunny:GameObject;
var white:GameObject;
var grey:GameObject;
var rabbitID:int=0;//Indicates witch rabbit will appear

function Start () {

}
function Create()
{
//Choose a number
rabbitID=Random.Range(0,2);
if(rabbitID==0)
{
bunny=white;
}
else if(rabbitID==1)
{
bunny=grey;
}
//Creates the rabbit the code chose
Instantiate(bunny,transform.position,transform.rotation);
}
InvokeRepeating("Create",0.1,20);
function Update () {

}

However instead of getting out of the holes in the defined time,they’re getting out randomly,not randomly actually but too fast,even if I put more time in the InvokeRepeating.
Thanks For the help:mrgreen:

It works perfectly for me. How do you have the scene setup?

Unless you’re wanting the bunnies to physically move…This is just creating them every 20 seconds.

Thanks for the answer :smile:
Well I have 9 “holes” each other with an empty game object here’s a pic:

the bunnies are not moving by sprite animation
Bunnies have this code:

#pragma strict

function Start () {

}
function Destruct()
{
yield WaitForSeconds(2);
Destroy(gameObject);
}
function Update () {
Destruct();
}
function OnMouseDown()
{
Destroy(gameObject);
}

Can this be affecting the “game”?