When I run my game and the character dies my game freezes when i try to respawn him, Can anyone help check my Gamemanager code?

I have been making a game in Unity to teach a games design course to Year 10 and 12 next year, the game functions okay but when the character dies and I press any key to continue the game freezes up. I have checked the Game Manager script but not sure where the error might be, I have put the coding in here any help you can give will be appreciated:

using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System;

public class GameManager : MonoBehaviour {

public GameObject playerPrefab;
public Text continueText;
public Text scoreText;

private float timeElapsed = 0f;
private float bestTime = 0f;
private float blinkTime = 0f;
private bool blink;
private bool gameStarted;
private TimeManager timeManager;
private GameObject player;
private GameObject floor;
private Spawner spawner;
private bool beatBestTime;

void Awake(){
	floor = GameObject.Find ("Foreground");
	spawner = GameObject.Find ("Spawner").GetComponent<Spawner> ();
	timeManager = GetComponent<TimeManager> ();
}

// Use this for initialization
void Start () {

	var floorHeight = floor.transform.localScale.y;

	var pos = floor.transform.position;
	pos.x = 0;
	pos.y = -((Screen.height / PixelPerfectCamera.pixelsToUnits) / 2) + (floorHeight / 2);
	floor.transform.position = pos;

	spawner.active = false;

	Time.timeScale = 0;

	continueText.text = "PRESS ANY BUTTON TO START";

	bestTime = PlayerPrefs.GetFloat ("BestTime");
}

// Update is called once per frame
void Update () {
	if (!gameStarted && Time.timeScale == 0) {

		if(Input.anyKeyDown){

			timeManager.ManipulateTime(1, 1f);
			ResetGame();
		}
	}

	if (!gameStarted) {
		blinkTime ++;

		if (blinkTime % 40 == 0) {
			blink = !blink;
		}

		continueText.canvasRenderer.SetAlpha (blink ? 0 : 1);

		var textColor = beatBestTime ? "#FF0" : "#FFF";

		scoreText.text = "TIME: " + FormatTime (timeElapsed) + "

<color=“+textColor+”>BEST: " + FormatTime (bestTime)+“”;
} else {
timeElapsed += Time.deltaTime;
scoreText.text = "TIME: "+FormatTime(timeElapsed);
}
}

void OnPlayerKilled(){
	spawner.active = false;

	var playerDestroyScript = player.GetComponent<DestroyOffscreen> ();
	playerDestroyScript.DestroyCallback -= OnPlayerKilled;

	player.GetComponent<Rigidbody2D> ().velocity = Vector2.zero;
	timeManager.ManipulateTime (0, 5.5f);
	gameStarted = false;

	continueText.text = "PRESS ANY BUTTON TO RESTART";

	if (timeElapsed > bestTime) {
		bestTime = timeElapsed;
		PlayerPrefs.SetFloat("BestTime", bestTime);
		beatBestTime = true;
	}
}

void ResetGame(){
	spawner.active = true;

	player = GameObjectUtil.Instantiate(playerPrefab, new Vector3(0, (Screen.height/PixelPerfectCamera.pixelsToUnits)/2 + 100, 0));

	var playerDestroyScript = player.GetComponent<DestroyOffscreen> ();
	playerDestroyScript.DestroyCallback += OnPlayerKilled;

	gameStarted = true;

	continueText.canvasRenderer.SetAlpha(0);

	timeElapsed = 0;
	beatBestTime = false;
}

string FormatTime(float value){
	TimeSpan t = TimeSpan.FromSeconds (value);

	return string.Format("{0:D2}:{1:D2}", t.Minutes, t.Seconds);
}

}

Thanks have tried changing it but stops the Game working completely.