How to have a "Press "E" to Pickup Ammo" Message show up when looking at item

So im trying to get OnTick > linetrace and on breakhit if it sees the object, I create a widget…

It shows up…

So how do i remove it?

Not sure on the question. Remove what? The linetrace or the message?

You may want to have a flag of sorts that determines if the message is shown, either on the player character or the item you’re looking at. Toggle the appropriate flag as needed.

In on the item, you can use an actor component, a tag, etc. to flag if the item is interactable, then query for the collision. You can alter trace/object channels as needed to allow/disallow the object to appear in a trace.

It’s no good putting the widget up just because there’s a blocking hit. It would be much better if the blocking hit implements your blueprint interface. That way you know the object is interactable:

If the object is interactable, the player can call the widget. Write the widget so that without further input, it fades after a second or two and does ‘remove from parent’.