Casting to Hud not working

Hi,

I am trying to cast to my hud and execute a function in the hud to create a widget from my player, but it doesn’t seem to be working.

I am attempting to do it how it is explained here https://answers.unrealengine.com/questions/595825/remove-widget-from-viewport.html, but it is not working.

here are screen shots of my BP for the character

and here is the function i am trying to call

Did you assign the HUD class in the Game Mode?

242257-hud.png

  1. What is before the first screen shot? Is it just “begin play” or something like that?
  2. Are you sure you are using a “HUD” class not a “widget” that you simply “called” a HUD?

Yeah I did set the hud class

It’s set to the default firstpersonHUD from the first person project so that all seems right.

  1. Yes, it is just after begin play
  2. Its a HUD class it has the symbol with the plus and 5 boxes rather than the heart with two lines

Sorry for wasting everyone’s time, I had stupidly tact it on to the end of other nodes in front of the begin play and didn’t realize the last part was conditional.