Windmill Script Problem

I have a problem with my script, it is not rotating in the middle but it spins in circle, here is the screenshot:

The properties tab

This is the script I used
— while true do
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0, 0, math.rad(2))

That’s because your making the wrong part rotate and not the middle thing.

Add an invisible part in the center of the windmill blades and use that as a PrimaryPart

I tried that and it didn’t worked.

You might not have set it up correctly. You would have to group the blade and the center part inside a model, set the part as the model’s primarypart, then instead of changing the CFrame of the blade part, use SetPrimaryPartCFrame on the model.

--script is in the model with the blade part and the primary part
local speed = 1 --radians per second
game:GetService("RunService").Heartbeat:Connect(function(delta) -- runservice events are more reliable with timing than 'while true do'
	script.Parent:SetPrimaryPartCFrame(script.Parent.PrimaryPart.CFrame * CFrame.Angles(0, 0, speed * delta))

Thank youu!