Locally Rotate Welded Part

I have all parts in a model welded to a single PrimaryPart.

Is it possible to rotate the welded parts on their local axis and not around the PrimaryPart? That way, the primary part can rotate but also have the welded parts rotate on their local axis?

Here’s a terrible illustration on Paint.

1 Like

just place the welded part that it turn around inside the middle of the object ur trying to rotate…

:smile:

I just noticed my illustration is off, i’ll redraw it.

I’m still not fully understanding. Let me explain what I see.

You do NOT want the parts to move around the primary part, say like planets around a star.
You want the parts to rotate around themselves, like planets rotate which causes day and night?

You said locally so I thought just use a local script? but now I am confused?

My bad, I fixed my illustration error.

The blue part is welded to the black part. I’m trying to rotate the blue part on its local axis through the weld properties. Instead, it’s rotating around the black part. (Which is the part it’s welded to).

The effect I’m trying to achieve is having the blue part move and rotate with the black part. While still having its own circular rotation.

Ok so just do this script to turn it around:

BluePart.Orientation = BluePart.Orientation + Vector3.new(0,0,1)

If you are using WeldConstraints, I believe you can simply just run basic code to change it’s CFrame. See:

for i = 1,360 do --Rotate one degree per step.
    Part.CFrame = Part.CFrame*CFrame.Angles(0,math.rad(1),0)--CFrame.Angles takes the arguments in radians. Use math.rad to convert degrees to radians.
    wait(0.1)
end
1 Like

i think you can Disable the weld and enable it again

weld.Enabled = false
BluePart.CFrame = BluePart.CFrame * CFrame.Angles(0,math.rad(45),0)
weld.Enabled = true
1 Like

I’m using regular welds but the result is the same. The problem is that if I apply a rotation to the blue part. It will also rotate the main part with it. I’m trying to achieve an independent rotation on the blue part.

disable the weld and enable it again

I see. Here’s a solution. It’s rather hacky but should achieve the intended behavior.

  1. Have the central part.
  2. Have invisible parts welded to the central part right below where you want the visible things to be.
  3. Use Motors to spin the parts which are attached to the invisible welded parts.
1 Like

Disabling and enabling achieves the result I’m looking for with a WeldConstraint by setting the CFrame. I’ll weld an invisible part and rotate the blue part while re-positioning it to the invisible part. It seems to be the easiest way. Thanks for your help guys!

1 Like