Why does this not work? I don't know what else to try?
if (p.health < 100){
setTimeout(function() {
p.health + 1;
},2000);
you are just calculating p.health + 1 but not putting it back to
health. You are also missing a closing brackets } in the if statement. Here's the correct code.
if (p.health < 100){
setTimeout(function() {
p.health = p.health + 1;
},2000);
}