Anyone With Unreal c++ Experience Help?

I’m trying to call a function from another actor in an OnHit function (c++), but OtherActor returns an AActor, not the class in which the function is located, AData (or a subclass of it).

I haven't found any solution on the Internet, so i'm turning here for help.