How do I cast to an actor who isn't the player in a widget

I am trying to cast to a character that is not the player to attach the widget to it (I’m casting in the widget) I have tried making a variable but I have no way to reference to the other actor so I ask how do I reference that actor.

Did you try “Get all actors of Class” → Character

There you get an array with all Characters, then you just have to find the right one

I have and it won’t work as it mess’s up spawning the character as it delves into the array