bool doesn't change if i restart the scene

The script works fine whenever i’m starting the scene, but if i’m trying to reload scene with my button boolean isAlive doesn’t change back to true. I have a simmilar script for counting score and it works perfectly even if i reload the scene

Remember, do “not” do initialization or assignment on field decleration in scripts extended from Monobehaviour. This is why Awake() and Start() made for. Just move your isAlive = true; assignment in Awake().

private void Awake(){
     isAlive = true; 
}

Thus your value will be assigned every single time your script enabled.