Auto Creation Script with Timer

Hello Everybody,

Firstly thank you for your great help. I need a little help again.

I have a Cube and I am creating a sphere when everyclick. I need a little timer script for automatic create a sphere every 5 second.

I wrote a code but my timer is not working.

    if ( == "Cube") 
            var Sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
            Sphere.transform.position = Vector3 (10, 10, 5);

Please help me how can i make this event automaticly



See this question it pretty much answers your question: