Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I rotate a part using CFrame?

I'm trying to make a constantly spinning part, and I need to rotate it with CFrame. How do I do this? (I don't understand Euler angles at all.)

1 answer

✓ Accepted answer
while true do
	script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0.05,0.05,0.05)
	wait(0.01)
end

Put that in a script and insert the script into the part you wish to rotate. The part will rotate in 3 directions at once at a moderate speed. To increase the speed, slightly increase the values after ' CFrame.fromEulerAnglesXYZ'. To stop a rotation in one of the directions, erase the corresponding part of the value, such as putting (0.05,0.05,0.00) will make it spin in two directions instead of three.

I hope this helped!

This discussion is preserved as it was. New answers, comments, and votes are closed.