Label text only decreases, and won't increase

I’ve made a basic damage system, so my label updates, and decreases when taking damage (ie 100 to 90). However, when I try to add a health pickup, nothing happens. I’ve checked the code, and the message posting works, meaning I can take damage. Yet, when I change it to increase my health, it has no effect.

This is the code for the health system:
image

Can only one update code (for lack of a better term), be on the update message function?

Please post the actual code rather than a screenshot!

Your issue is that your “damaged” conditional contains the “heal” conditional. Note the two "end"s at the very bottom.

What you want:

if "damaged" then
    --stuff
end
if "heal" then
    --stuff
end

What you’ve got:

if "damaged" then
    --stuff
if "heal" then
    --stuff
end
end
3 Likes

Thanks. I’ve sorted it now.
Didn’t realise it was that simple, I think some of the error codes had thrown me off.

1 Like