Toggle HUD visibility?


I’m trying to toggle the state of a picture in my HUD. As of now I have an image that is set to hidden, and i use the function linked in the picture to set the visibility to visible so that you can actually see it on the HUD. The idea here is that you pick an item up, that item is connected with a boolean that gets set to true and then the function within the HUD should go off. This is however not how it happens for me, for some reason the engine crashes every time i try to run the game after I add a branch to my function.

Am i being stupid here, or is this a bug I’m getting? Any help is very much appreciated =)

Thanks for the reply. The first part did sadly not work for me as my game still crashes as soon as i try to launch it. The second part you suggested sounds interesting and i would like to give it a try, could you try to go a bit more in depth with it and explain it further or maybe link me to a guide which explains it?

Does this help you in any way? Here as soon as the hud is created, it waits 0.5 seconds, and checks whether my Image (LowBatteryIcon) is visible in the Widget or not. If it is, it sets its Visibility to false, and if it’s not Visible it sets the Visibility to true. Then it goes back to Delay where it waits another 0.5 seconds before deciding what to do. I’m sure there’s a better way of doing this, but it’s the very first thing i came up with.