Merge Skeletal Mesh Issue

Hello, I’m trying to merge some skeletal meshes together, but i have a weird problem.
For whatever reason, instead of appearing as hoped the meshes always appear at the root.
I’m not sure what I’m doing wrong here and there’s barely any information about this merging thing to begin with, so I really hope someone can provide an answer.

The images below are what the intended result is supposed to be (just done by attaching bone-to-socket), the current results that I want to fix (the whole mesh merge thing) and the code I’m using to do it.

If anyone can help here I’d really appreciate it.