How do I accurately set the cframe offset of a part in a script?

It’s all in the title, I cannot figure out how to accurately position the cframe of a part in the place I want it.
I’m trying to position a custom torso in a way that the head is dead center of the torso but I can’t seem to set the cframe offset correctly. This is the result that I ended up with:

And this is the part of the script handling it:

UpperTorsoArmor.CFrame = Character.UpperTorso.CFrame * CFrame.new(1,0,0.8) * CFrame.Angles(0,math.rad(180),0)

Initially i managed to get the torso in the right position, however the orientation of the torso was inverse, so when I added the CFrame.Angles() to get the torso to face the right direction, the whole thing got jumbled up. How do I figure out the amount of offset I need to get the torso in the right place under the head? I have been trial and erroring for a good while now but to no avail. Is there a way to accurate determine the amount of offset i need in the cframe.new or does the issue lie with the cframe.angles?

1 Like

You would have to add it to a character in studio while the server isn’t running and minus either the head position from the torso or the torso position from the head

then you would have the exact position to add to the CFrame.new and you could just get the orientation of the part for the CFrame.Angles

Not sure what you mean, you got an example?

https://gyazo.com/81452e6998c0cedcf2a29d52c04fd1ef
Lets say I want to weld this part to the characters back and keep the orientation aswell
https://gyazo.com/685e321d6bafaa2351a74c543eb02e21
Here I put the part in the position I want it to be on a dummy

Now I would minus the parts position (-800, 249, -618.5) from the torsos position(-800, 248.5, -617)

-0, -.5, 1.5 would be the full position now

Now I just get the orientation from the part (-40.51, 9.46, -55.28) and add it all together

Part.CFrame = character.Torso.CFrame * CFrame.new(0, -.5, 1.5) * CFrame.Angles(math.rad(-40.51), math.rad(9.46), math.rad(-55.28))


https://gyazo.com/795ec5db9f55198e1dbce3e07fece6a6
This should work

Oh my god, I’ve always wondered how people calculated it, thank you so much for this method.