Particle effect instantiate problem.

//Enemy Script

//Inspector variables
var numberOfClicks : int =2; //no of times you click to destroy object
var respawnWaitTime : float =2.0;
var shapeColour :Color[]; //colour array
var explosion :Transform; //loads the particle effect
var enemyPoints : int =1; // value of enemy destroyed

//Private variables
private var storeClicks : int =0;

function start()
	storeClicks = numberOfClicks;

function Update ()
	if(numberOfClicks <=0)
			Instantiate (explosion, transform.position, transform.rotation); //create an explosion
		var position = Vector3 (Random.Range(-6,6),Random.Range(-4,4),0); //new random position for game objects
		RespawnWaitTime ();
		transform.position = position; //move game object to new position
		numberOfClicks =storeClicks;
// will be used to hide and then unhide a GO for a random amount of time
function RespawnWaitTime ()
	renderer.enabled =false;
	yield WaitForSeconds (respawnWaitTime);
	renderer.enabled =true;
// random colour is used to change the colour of enemy GO in game
function RandomColour ()
	if(shapeColour.length >0)
	var newColour = Random.Range(0,shapeColour.length);
	renderer.material.color =shapeColour[newColour];

Been following the Walker Boys tutorial for a basic clicking game, everything seemed to be going smoothly until I got to adding lines of code for creating a scoring system. Could this be an issue with using unity 4 and the tutorials being 2 years old? Or is it just me and my lack of understanding?

Any help appreciated as always.


Grammar as usual “function Start” instead of “function start”!