Windmill Script

I am not a scripter, but I need help with my MeshPart (windmill) how do I make them spin, I have tried a couple scripts but failed.

You can spin a part, by incrementally increasing its orientation property on your desired axis. Or an easy alternative to this, would be to use a HingeConstraint. Here is a article that simply explains how to use a HingeConatraint with Motor enabled, to rotate a part:

You can use a HingeConstraint or a script:

while true do
     script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(math.rad(1), 0, 0)
     wait()
end

If it spins the wrong way, then swap the XYZ values in the CFrame.Angles() part like so:

CFrame.Angles(0, math.rad(1), 0)

or

CFrame.Angles(0, 0, math.rad(1))

You can also change the 1 to something else to make it spin faster/slower

1 Like