Ok so I’m going to try and explain why one method works and the other doesn’t. It all boils down to references and variables.
By default when you have a variable of a BP/Actor type they are all ways set to “Null” unless set at some point within the script. In the bottom two images that you said you were having issues with, this is most likely because the variable “GameHUD” has nothing stored in it. When you create variables like these just think of them as empty boxes, they remain empty until you put something in them. This is why you get the “Accessed None” type error message from the first of the two images.
As for the second one I first need to explain what a “Cast To” node actually does to explain why it fails. In UE4 you get a lot of primary class types that all other blueprints build upon.
The best example is “Actor”, this covers things from player character to that dancing road cone you’ve all ways wan’t to make. These them selves will however have there own classes/blueprints that has one of the primary classes as a base class. A “cast to” in a way changes how UE sees the reference, changing it from Actor to say DancingCone. This then allows you to access variables that have been created in the DancingCode BP.
If the Actor reference I’m trying to get UE to see differently has nothing to do with what I’m casting to it’ll fail. It’s like trying to fit a cube through a triangular hole. However in the second imaging this most likely fails because the variable “GameHUD” is just an empty box of “Null” which will always fail a cast as it doesn’t fit through the hole.
In the very first image that worked you getting an “Actor” reference the overlap event spat out and telling UE to see if its actually “MyCharacter” BP. If yes you then tell it to get “GameHUDWidget” (created inside the “MyCharacter” BP) and use the contents of the box as a target. I would imagine you set the variable to the widget you created.
In addition a variable of type “MyCharacter” for example doesn’t need to be “Cast To” “MyCharacter” to access the variables from the reference.
I hope this helps. I’m still trying to find a good way to explain the whole casting thing so I can make an in depth tutorial, so if you like the explanation let me know.