What do you want to achieve?
I want to achieve a part that spins smoothly without any lag.
What is the issue?
The issue is it spins but is a bit laggy.
What solutions have you tried so far?
Finding a solution.
local part = script.Parent
local tweenService = game:GetService('TweenService')
local tweeningInfo = TweenInfo.new(5,Enum.EasingStyle.Linear,Enum.EasingDirection.In)
function TweenCreate()
local Props = {Orientation = Vector3.new(0, part.Orientation.Y + 360,0)}
local tweenRotate = tweenService:Create(part,tweeningInfo, Props)
tweenRotate:Play()
return tweenRotate
end
while wait() do TweenCreate().Completed:Wait() end
Then you should try using tween service without any while loops or run service because if you use loops on server it can easily bring lag.
Or another way of doing it is to do a loop that loops only every 5 seconds (the seconds you putted in the tween) instead of the least ammount of time it can,