game over screen

i need a game over screen on my game. but it says that game is over while i still playing the game. but when my life becomes zero then the “Game Over” text disappears. can you please help me on this. i’m freaking out!

can you just show the code where you are getting problem

hi @TrueMaskss786 this is my code

using UnityEngine;
using UnityEngine.SceneManagement;
using System.Collections;
using UnityEngine.UI;
public class lifelost : MonoBehaviour
{

public GameObject over;
public int life;
public Text lifeText;



// Use this for initialization
void Start()
{
    over = GameObject.Find("gameover.Unity");
    SetCountText();
}
void OnClickWrong()
{
    life -= 1;
}

// Update is called once per frame
void Update()
{

    if (life == 0)
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
public void LifeLost(int lifeMinus)
{
    life -= lifeMinus;
    SetCountText();
}
void SetCountText()
{
    lifeText.text = "Life : " + life.ToString();
}

}