Access to variables in a widget blueprint

The problem here is that you are casting nothing to your TEST_NPC. So it will always fail. Do you have one widget for each NPC? Where is this widget created? If you are spawning your widget into your NPC blueprint, you can add a variable in your widget. Let’s call it, for example, “Owner”. Expose it on spawn and it will be visible in your “Create Widget” node. So you can set this variable to the NPC that is spawning this widget. Then your “GetPercent” function will take the “Owner” and retrieve his current health, without need of the cast.