Problem With CFrames

Hello developers,
I’m having a problem with CFraming my tool to the player’s torso.

CFrame

As you can refer from the photo above, I have 2 attachments.
Yellow is from the player’s torso, red is from the sword’s handle.

The problem is I’ve been finding ways to position the red one to the yellow one.
(Expected result)



If you have any knowledges about these things, your help is very thankful!

2 Likes

This is basically how welds functions, the CFrame of a weld C0 is relative to the part0 just like how an attachments CFrame is relative to the parent

Keep in mind it’s weld not weldconstraint which doesn’t have C0 and C1 properties.

Weld.Part0 = torso.Attachment.Parent
Weld.C0 = torso attachment.CFrame

Weld.Part1 = sword.Attachment.Parent
Weld.C1 = sword.Attachment.CFrame
Weld.Parent = anything under workspace -- sword or torso can work 

Mobile sry

3 Likes

Now I understand how it works, thank you so much for you help!
image

2 Likes