How do I make a modular weapon system for vr in UE5?

so I’m new to game programming and I am trying to make a modular weapon system for a vr game I’m working on. How would I go about doing this? I can’t think of any ways to do this without using explicit casts but that’s still no good.

I want it to work that there are handles that have an attachment point (or multiple) and each of these attachment points can take a different type of blade/weapon head (e.g. shortsword handle has 1 attachment point with small and medium tags for what it can connect to.)

There are many ways this can be done. One way is create an actoe blueprint for the modular weapon, put in the blade, then switch the blade using the Set Skeletal Mesh node in the modular weapons blueprint. So you wouldnt actually be attaching anything, youd be switching the blade at run time.

Or you could spawn the blade separately and use the attach component to component node to attach it to the modular weapon from your player actor blueprint.

A few notes, you can attach things in blueprint to any joint on a skeleton in the details panle of your skeletal mesh. There is an attach to option. Or you can use scene compinents to act as your attach location/rotation.