Line trace to change text on widget to an object name

I have been trying to make a widget change its text accordingly to what item hits the line trace. I am quite confused and cant seem to find any questions which help me. Help would be greatly appreciated. Thank you.

How would I reference the widget?

the issue here is that you dont have the anything connected to the cast node. with no exe pint the node will never fire. also with no reference plugged into the object node the cast will always fail.

to solve this take the exe pint from your trace and plug it into the cast node. then get a reference to the widget and plug that into the object pin.

where do you create the widget?

basically go to where you create the widget and the blue return pin on it is a reference to the created widget. you can use that as a reference. i assume you create the widget in on your player character, player controller, or in the game mode. if thats the case you could take the reference and save it as a variable(ill assume its on the character for this example). then in your scanner bp do the following: get player character node → cast to (insert player class here) → get (insert variable name here).

The widget is being created on another BP actor, so its basically like looking at a screen which displays the item name. I have followed your help and there is no errors now, thank you. It still isn’t changing the text (or displaying it) on the widget. I will just have to attempt to mess around with it some more. Thank you for the help.

UPDATE: So if I add the widget to the viewport it updates the text, but the widget in the BP actor doesn’t update, I am a little confused as to why.

the one on the actor and the one for the viewport are probably two separate objects so you will have to update them separately.

Sorry about the amount of questions, I am just wondering how I would update the actor, cant seem to think of a solution that works.

Doesn’t matter I have it working now, thank you so much for your help.