Part Rotation CFrame

Hi, i was trying to figure out how to make a part constantly rotate, but I was wondering if constantly changing the CFrame would cause lag since a decent amount of parts will be rotating, if so what would be the most optimized way to constantly rotate a part?

Using cframes should be fine—————-

1 Like

As was said above, using CFrame should work completely fine. At the point where it would lag, that would not be the fault of CFrame, but simply too many parts and actions, that would happen with almost anything you do. If it’s possible, you could also use AngularVelocity and attach the part via attachments to another, anchored part (the rotating part can’t be anchored).

2 Likes

you can actually rotate the part. you must entering a script in the part. (i recommend you use mesh, gear mesh would be fine).

while true do
script.parent.CFrame = script.Parent.CFrame * CFrame.cframe.fromeuleranglesxyz(0,0,05,0)
1 Like
local run = game:GetService("RunService")

local part = workspace:WaitForChild("Part")

run.RenderStepped:Connect(function()
	part.CFrame *= CFrame.Angles(0, math.rad(1), 0)
end)

Here’s a sample script for you to take inspiration from.

https://gyazo.com/b0b78cbd7ff38aa88c9ec2419f786830