Labels not resetting

So, I have a label in my game that says “3” with a “Health” label beside it. Whenever my health reaches 0, I make it TP my player back to the beginning and reset the health. I can’t actually add dying, as that would create a LOT more problems for my game. When it reaches 0, it does teleport back to the beginning. However, my label stays at “0”, though when I play the game and look at the code, it is back at 3. When I take 1 damage, it goes to 2. It works and is fine, but it is very confusing for players when they see they have “0” health, and is just annoying to keep. Is there any way to fix this? I’ll send a screenshot of the code.

The problem is in the “health” number block. When you send a signal to “get” or “+” in the block, it will output the number to the other side, BUT if you send a signal to “set”, it will change the value, but will not send an output to the other side.

To fix this, simply drag the “out” on the “death gain” number to “get” on the “health” number so that both “set” and “get” are hooked to “out” on the death gain number!

Just tried doing that, had the exact same outcome. Once I reach to 0 health, I teleport back but the label still says “0” (but still is 3 health in reality).
Screenshot_3

1 Like

This will sound weird, but move the “less than 1” filter to below the health Label behavior (and keep sup3r87’s suggestion)
And if you hold Shift before you move it, it will just move the filter
(Or alternatively, you could simply move the Label behavior to be above the filter)

2 Likes

this could definitely be the cause - flowlab’s parser could contribute to the issue too. but what you did definitely helped!

1 Like

It apparently worked! No idea how, but thanks a LOT! Thank you too, @sup3r87 for helping me out too!

2 Likes