How can I fix this to make sure every part stays attached at all times besides manually editing every animation, keyframing every time they detach? I tried many different weight paint setups already and nothing works.
Could you post a screen of what the anim looks like with all bones visible? Click teh eyeball show bones all hierarchy. Hard to tell whether it’s weight issue with mesh or if anim is breaking joints without seeing the bones.
If anim is breaking joints, may need to edit skeleton, and set all the bones to only use rotation from animations(except pelvis which would probably need translation scaled too).
I see two problems: First the twist bones in thigh and upper arm appear to be bending instead of twisting, which is what’s causing the knees and elbows to float away. Second, it also looks like the vertices on thigh and upper arm on the mesh may have some influence from the pelvis and clavicle or spine( since it seems they’re not rotating all the way with their bones)
To fix the bendy bones, you could make your own IK rig and retarget rig and manually set up the bone chains so the anim retargter doesn’t bend the thigh or upper arm. Autogenerated retarget rigs sometimes don’t handle twist bones well. Or, since a robot like that doesn’t really need soft twisting, you could just delete the twist bones and reimport so the retargeter can only bend at knee/elbow. To fix influence problem go to weight paint mode ( in blender or in UE) and erase all weights on the thigh and upper arm except the bone they should be attached to and make sure the weight for the upper arm/thigh are full strength.
If it only hapness after retargeting, it’s likely a retargeting or bone hierarchy issue rather than weight painting. Check your rest pose, bone mapping, and ensure each mesh part is fully assigned to the correct bone. A screenshot of your retarget setup would help identify the exact problem.