WaitForSeconds not waiting

i have a problem in this script and the problem is . . i use a yield WaitForSeconds this script is not wait . . and immediate jump onto next level how to fix this problem? script is given below

#pragma strict

var offsetx : float = 0.5 ;
var offsety : float = 0 ;
var sizex 	: float = 0.5 ;
var sizey 	: float = 1 ;

var columnsize = 2;
var rowsize = 1 ;
var columnframestart= 1;
var rowframestart = 0 ;
var totalframes = 2 ;
var framesPersecond = 3 ;

var blastPref : GameObject ;
var callWait : boolean = false ;
function Start () {

}


function Update () {
/*
var offset  = Vector2( offsetx , offsety );
var size  = Vector2( sizex , sizey );

	
	renderer.material.mainTextureOffset = offset;
	renderer.material.mainTextureScale = size;
*/

  var anim = this.gameObject.GetComponent(sprite);
   anim.sprite( columnsize , rowsize , columnframestart , rowframestart , totalframes , framesPersecond );
  
	
    }

function OnTriggerEnter(col : Collider)
{

	if( col.tag == "Player"  )
	{
		Debug.Log("collide with mine");
		Destroy(this.gameObject);
		Instantiate( blastPref , transform.position , Quaternion.identity);
		blastPref.transform.Rotate(90 ,0 ,0);
		Destroy(col.gameObject);
		callWait = true ;
		yield WaitForSeconds(2);
		
		Application.LoadLevel(0);
	}
	
}

I think “Application.LoadLevel(0);” works only in the Update Method, create a boolean and set it to true in OnTriggerEnter, then create an IF Statement to check if it works. I’m a noobie trying to help out :wink:

yield WaitForSeconds(2) doesn’t work because you destroy the gameObject before. Coroutine only work when gameObject is active.