Set Orientation with CFrame

What I’m looking to do is set the Orientation of a part, but using CFrame.
If I want to get the part’s orientation set to something specific, it should be set to that, as if I were directly setting the Orientation with a Vector3.
Why I can’t just use Orientation is because I’m using welded parts, and welded parts don’t work with Vector3.

I feel like I’m overthinking this heavily, it should be pretty simple but everything I’ve tried doesn’t work.

Forgive me if I am wrong, but like CFrame.Angles()?

I’ve tried it, don’t know what I’m doing wrong.
Using CFrame.Angles() doesn’t give an exact wanted orientation, such as setting the part to 0,50,12 exactly

Are you converting to radians? CFrame.Angles is in radians, not degrees. You can easily convert with math.rad([Degrees here])

Yes, I am converting to radians

Sorry to ask, but can I see your current code?

gear.CFrame = CFrame.new(at.WorldPosition) * CFrame.fromOrientation(math.rad(at.WorldOrientation.X),math.rad(at.WorldOrientation.Y),math.rad(at.WorldOrientation.Z))

gear is the Part, at is the hand attachment in a player’s arm.
It’s supposed to orientate a gear in the player’s left arm properly, which it does when standing still, but not when walking or jumping.

I believe that I have your exact same code, but it worked for me, even while jumping.

gear.CFrame = CFrame.new(at.WorldPosition) * CFrame.fromOrientation(math.rad(at.WorldOrientation.X), math.rad(at.WorldOrientation.Y), math.rad(at.WorldOrientation.Z))

image

You may have noticed weird results solely because of how each joint/attachment in the player is orientated.
For example mine is the elbow joint, so it bends weirdly while jumping.

When setting the Orientation value itself, it always worked properly. However, it doesn’t when using CFrame.Angles().

To be honest, I’m a bit confused. Did I misunderstand what you were attempting to achieve with my answer? Is this not a viable result?

What happens when using CFrame: REx3 Test Realm - Roblox Studio 2022-10-02 19-52-34
What I want to happen: REx3 Test Realm - Roblox Studio 2022-10-02 19-55-16
The 2nd example uses Orientation, which doesn’t work in many cases due to the fact that it does not properly support welds which I use frequently.
Sorry I forgot to turn my music off when recording.

You can use Attachment.WorldCFrame instead, or just attach an accessory to said attachment.

Tysm, it worked.
I didn’t know this was a thing. I feel so silly.