I personally have very little experience with CFrame, so how would I do this?
If you want to rotate a part around a certain CFrame, you have to put its orientation in terms of that CFrame (its object space) and then change it relatively to make it pivot around that point.
local pivot=CFrame.new() local new=pivot*CFrame.Angles(0,math.pi/4,0) Part.CFrame=new:toWorldSpace(pivot:toObjectSpace(Part.CFrame))
One way is to have a part that is welded to the part that you want to move, however, you move the welded part. (I recommend having the size of the part you move to be as small as possible)
Here's what I mean:
local pivot = game.Workspace.PivotPart --Change this to where the PivotPart is local Part = game.Workspace.Part --Change this to the part you want to move --Welding... local W = Instance.new("Weld") --Create a weld W.Part0 = pivot --Make Part0 the pivot point W.Part1 = Part --Make Part1 the part you want to move local CJ = CFrame.new(pivot.Position) --These next three lines are calculating how to offset the part local C0 = pivot.CFrame:inverse()*CJ --so that the pivot point is at the same location you position local C1 = Part.CFrame:inverse()*CJ --it. So you don't have to CFrame this part. W.C0 = C0 --Changing the CFrame of the pivot point W.C1 = C1 --Changing the CFrame of the actual part --So now the pivot point is welded to the part and it looks the same as it would in studio W.Parent = pivot --Finally, assign the Parent of the weld to the pivot point --Now we can move the part around by changing the CFrame of the Pivot point! while wait() do --You don't have to have this part, but what it does is it makes the part rotate along the pivot.CFrame = pivot.CFrame * CFrame.Angles(0, math.rad(1), 0) --Y axis at 1 radian every 0.03 end --seconds. This is an example, not a requirement.
If you like 1waffle1's answer better, that's fine. But I think my idea would be a bit longer, yet easier to use.