Cannot call Add component functions from static libraries?

I’m working on a game that features a weapon switching system, I’m trying to build it modularly so the main player class isn’t so bloated. I’m writing a function that changes an actor component variable to a new instance of another actor component, yet for some reason I can’t call Add component outside of an Actor blueprint, even when I have an actor reference to call it from. Exactly what namespace is that function under?