Accessed None When Trying To Cast To A Widget?

Okay, here’s the quick rundown. I have a widget called “LevelEndStats” to show your score in stars and the gems you collect along the way once you finish the level.


This is my code that is sitting within the Widget to change from the default grey to a purple color. I know this code works because I tested with “EventBeginPlay” and the Gem in the widget was auto purple. Great. My problem comes when I try to make it a “CustomEvent”, as shown above.

This code sits within the Gem itself. On Overlap → Destroy Actor → Call Event to change the Gem. Yet every time I try and run this, I get an error saying it accessed none trying to read that last node. Am I missing something?

Imagine what happens when ‘destroy actor’ gets called… :slight_smile:

2 Likes

I feel so utterly stupid right now…Thanks lol

1 Like

i think u may use “remove all widget” to set widget hide , it may change the index number of widget array ,while u create widget again , its the 2nd one ,so u may get[1] ,not get [0],so u can try loop array .

1 Like