Can't change the value of an object reference variable

I want the player to die once he reaches 0 hp, the rest of the code works just like it needs to, but I just can’t change the value of object reference variable, how do I that ?