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 (selectedObject.name == "Cube") 
        { 
            var Sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
            Sphere.transform.position = Vector3 (10, 10, 5);
        }

Please help me how can i make this event automaticly

Regards

Vincenzo

See this question it pretty much answers your question:

http://answers.unity3d.com/questions/14913/programming-help-with-instantiate/14934#14934