I tried using the Rotation property, until i remember Model's don't have a Rotation property, so now i need help?
You are correct on that note. To Rotate all children of a model, I'd recommend using the GetChildren method.
a = game.Workspace.Model num = 0 repeat for i,v in pairs(a) do v.Rotation = v.Rotation + .1 end num = num+1 wait() until num == 10
The above script will move all the parts in a circular motion until I call it to stop.
A way I commonly use involves Model:SetIdentityOrientation()
and Model:ResetOrientationToIdentity()
.
First, set the model's PrimaryPart to something inside the model (a Part will work) In this case, I will use part P
.
Now we call Model:SetIdentityOrientation()
.
Now, I set P
's Rotation value to a rotation I choose. Note that the model will rotate the other way.
Finally, we call Model:ResetOrientationToIdentity()
to rotate the model.
From here you can reset the PrimaryPart value if you wish, if so you should call the Destroy()
method on part P
.