Here is a piece of code I am using to kill the player but am getting an error saying: Cannot implicitly convert type int' to bool’. I’m trying to destroy the player object when Health = 0.
Any thoughts on how I could fix this?
public int Health = 100;
void Update () {
if(Health = 0)
Destroy(GameObject.FindGameObjectWithTag("Player"));
}