How to change the class of a child actor component in runtime?

I had something on my weapon’s construction script that would attach it elsewhere.