Question about how to go about attachments for weapons

Hello, I am not exactly sure what would be the best method for attachment system for firearms. I was thinking of a skeletal system telling each item where it is able to attach to. Would this be the best/most effect/most efficient way of doing this? If there is an actual way of doing this I would love to know! thank you.

You add sockets on the skeleton using the editor. In Begin Play event you spawn the weapon or attachment at the location of the socket. It looks as if the weapon is attached to the character. Then you can setup key events to switch the weapon locations for example from a holster to a characters hand. The same goes for the weapon itself. For example if the weapon has a skeleton mesh you can add sockets to it and then spawn attachments like lights, grenade launchers etc.