survival shooter game restarting when player dies

Hi guys, in my survival shooter tutorial, my game restarts when the player dies even if the script game over Manager isn’t on the hud canvas. also, the animation for game over only stays on the screen for a few seconds. I can’t see why the game restarts without the script tells it too.

Without any code to go off I can’t really see the problem enough,

however you could probably do it with :

 if (GameObject.Find("canvas").GetComponent<Canvas>().enabled == false
    {
    Scene loadedLevel = SceneManager.GetActiveScene();
    SceneManager.LoadScene(loadedLevel.buildIndex);
    }

though I recommend you go with a button click.

Try using Time.time!!!