How to access character from actor?

Im programming a door and im trying to access the character from the door actor and it returns null im using forward declaration and its not working. Also im using line traces from a character component to identify the door.

It would be good to show your code