How would I replace my simple while loop and still do the same thing? (UNSOLVED)

I made a helicopter and on the helicopter for the Rotar Blade I have a simple script with a while loop in it and all it does is it rotates the rotor blades just like an irl helicopter and it works great but it is causing some unwanted lag here is the script:

while wait() do
	script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, 1, 0)
end

Thanks.

Run service
for example

game:GetService("RunService").Hearbeat:Connect(function()
	--function
end)
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.