Getting Variable of Spawned Actor?

I’m working on a little thing where most of the actors have been spawned in instead of being in the level at the beginning, and I need one to check a variable in an actor it hits. I’ve searched around online, but I can’t figure out how to get it to access the other actor’s variable. What should I be doing?

If you can show us how you spawn the actor and how it is related to other classes we might be able to help you

When you spawn an actor, you can get its variable as output. When you use Hit Functions or Overlap Functions you can get OtherActor variable as AActor type. If you want to access the class of the actor, you have to cast the AActor type to the class of the actor.