Remove Widget Showing on Screen

Sorry, Please anyone can tell me how to make my widget go away when not hitting the object? I have tried this way, however, it’s not working. Please, can anyone show me?
I have used showing with the delay on screen however, it’s not what I am after…
Thanks,

when creating the widget, promote it to a variable then when you want to remove it, get it and drag out to remove from parent.

Thanks…but there is no easier way such as just to connect another function etc. Its just because for me I don’t understand “promote variable and remove from parent”…
Also if I connect when is false to remove all widget …why is not working?
I will appreciate if someone can show me with graphics…
Thanks,

Thanks Gxbzi

Is it possible for you to explain how to promote as variable and remove from parent ?

Honestly not the best way to go about it, I would probably just set visibility so you only create the widget once and use a “visible/hidden” toggle. BUT in your case the issue is with the branch node, that node is probably never “false” because you are likely using a line trace by channel and it will always hit something. If you just remove the branch node and hook everything directly to your cast node with the “fail” of the cast going to the “remove all widgets” node this will work. It is incredibly inefficient as casting on what is probably a tick from your line trace is unnecessary but it is the “easiest” way as you requested. I would learn about variables and such soon though or you are going to be having lots of bloated script.

I was doing something similar and just manually filtered out the On Hit result i wanted. This is Probably the entirely wrong way to do this… but. it worked.

You guys are working way too hard to do something fairly basic. Just set a reference to the desired class or object you want to search for then when you are within range (overlap a certain area for example, start a timer that fires off line traces and check the hit result against the actor you want). When you leave the area clear the timer. This way you only use line traces when necessary and you don’t have to go through 3 branches to check what kind of actor you hit.