Failing to update text to UMG

Hi, So basically, I have an integer called “coins gained” that updates every time I overlap a “pickup”. This works fine as I have the values update to a string and it comes on screen and all that. However, whenever I try to pass that integer and update the text within UMG, the text basically disappears all together. I’ve narrowed the issues down to what I think is probably a casting problem, but I can’t understand why. Hopefully, someone will help me figure this out.
Also, I do the overlap within my character class and I assign the coins there also. And I display the UMG within the character blueprint as well.

I’ve had issues in the past due to using casts to my player controller within the UMG hud.

Did you try creating an exposed variable in your hud widget that would essentially be “coins” and just update it after your destroy actor?

Since you already kept a reference to “Main HUD Widget” in your blueprint, it should be very easy and it would eliminate the need to get player character in your “Get Text 0”.

You’re my hero man. I even had the coins variable already in there, I just had to replace the binding with the variable itself. Can’t believe I overlooked that. Thanks a lot.

Glad I could help! Feel free to mark it as resolved :wink: