How do I make something instantiate over and over after 5 seconds?

Here is my code.
This is what i am trying to do. When a brick is destroyed i want to instantiate the same brick after five seconds but it doesnt do that. when i run it doesnt instantiate and i dont know why. please help!!!

var scoreValue : int;
var gameController1 : GameController1;
var brickParticle : Transform;
var brick : GameObject;
var box : BoxCollider2D;
var restartDelay : float = 5f;
private var restartTimer : float;

function Awake() {
    box = GetComponent.<BoxCollider2D>();
    box.enabled = true;
function Start () {
    var gameControllerObject : GameObject = GameObject.FindWithTag ("GameController1");
    if (gameControllerObject != null) {
        gameController1 = gameControllerObject.GetComponent (GameController1);
    if (gameController1 == null) {
        Debug.Log ("Cannot find 'GameController1' script");

function OnCollisionEnter2D(coll : Collision2D) {
    gameController1.AddScore (scoreValue);
    Instantiate(brickParticle, transform.position, transform.rotation);
    function Instantiate() {
    restartTimer += Time.deltaTime;
    if(restartTimer >= restartDelay) {
            Instantiate(brick, brick.transform.position, brick.transform.rotation);

see that



Button, use that to format your text, I’ve done it for you this time. Now some basic lessons.

Awake and Start get called at the start and Update gets called every frame but you don’t have an Update.

This means that you only call Instantiate (bad name BTW, change it to InstantiateBrick as Instantiate already exists) when OnCollisionEnter gets called. So it doesn’t constantly add to your restartTimer. You’re adding a tiny fraction of a second each time a collision is entered, you need to handle that time increase in Update and call InstantiateBrick when the timer breaches.