Hello! I was wondering how I could make an object rotate. But not only that but how do I set the speed aswell. If anyone would have a solution that would be perfect, since I have no clue where to start or where to end :)
You do not have a simple rotate command, also rotating a model is not the best way to do what you want, you should union the parts you want to rotate first.
To rotate them change the CFrame, not the Vector3 orientation as it might teleport ontop.
CFrame.new(Vector3 pos, Vector3 lookAt)
Or use another way, just use cframe xD
To keep rotating it use a loop
local part = script.Parent n = 0 repeat wait(0.2) if n <= 360 then n = n + 1 end local rot = Vector3.new(math.rad(part.Orientation.X),math.rad(part.Orientation.Y),math.rad(part.Orientation.Z)) part.CFrame = CFrame.Angles(math.rad(part.Orientation.X),math.rad(n),math.rad(part.Orientation.Z)) until false
I used CFrame.Angles in the example that looks like to work better for me, you can see how it works for you though, you can also use tweens.