Rotate Welded Parts Based on their CFrames?

  1. What do you want to achieve? Keep it simple and clear!

image
I want to rotate the part welded to my HumanoidRootPart so that only the Y axis in its CFrame is changed

  1. What is the issue? Include screenshots / videos if possible!

image
I want it to rotate like this (based on the welded part’s CFrame), so I built this script:

game.TweenService:Create(game.Selection:Get()[1],TweenInfo.new(.5,Enum.EasingStyle.Linear),{C0 = game.Selection:Get()[1].C0 * CFrame.Angles(0,math.rad(90),0)}):Play()
--Note: I'm selecting the weld, Part0 is the forcefield block and Part1 is my HRP

.
.
.
but instead, what it does is rotate like this (based around the CFrame of the part it is welded to, which in this case is my HumanoidRootPart)
image

if anyone knows how I can achieve this, please let me know

Check out the examples in my tutorial to see how you can change up your CFrame code.

For welds you can do Part0 inversing to make it relative to world space.

Or even change up the CFrame order of operations to make it rotate in a different axis:

1 Like

Thank you very much!

apparently all I had to do was multiply the weld’s C0 to the CFrame.Angles and not the other way around for it to work.