How can I get a Transform value (health system)?


I have a healthbar above my head:

It uses 2 boxes, 1 green, 1 black:

But after the bar has gone down to 0, it starts going out the other side when I get hit so I want the actor to destroy when the green bar is at 0, I tried this but nothing happened:

Your setup is very weird, why don’t you make float varable for health and update UI based on it, instead of using transform data of UI as a health system? Because issue here is probably caused by casting, before “<” node, you cast Transform to String and then you Float, did you check what is resulting float? If you used single float for health it would be a lot easier, but if you want to keep it that why why don’t you break transform in to axis and get one that represents health?

haha omg im so stupid thank you!