How would I make a part spin smoothly

  1. What do you want to achieve?
    I want to achieve a part that spins smoothly without any lag.

  2. What is the issue?
    The issue is it spins but is a bit laggy.

  3. 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

Thank you in advance.

If you are not using a local script, you better use a local script because the server may lag.

The script doesn’t work in a local script.

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,

Insert a body angular velocity in the part and set the angular velocity to 0, speed, 0

That doesn’t work either ( 3 0 c h a r )

Is the part anchored?

Uh oh the characters

Yes the part is anchored but it is a union

Unanchor it, body angular velocity is a physics based thing.

I unachored it and it fell through the map

Add a body velocity and done. Now the part shouldn’t move around, u don’t have to change anything in the bv

It still falls through the map with body velocity

There are 4 Different ways you can attempt this. I will list them here. If you want to see what just reply and I will go about it in more detail.

  • Set FrameByFrame Rotation Easiest and recommended
  • AlignPosition and AngularVelocityConstraint
  • BodyPosition and BodyAngularVelocity
  • 3 Tweens
1 Like

u can use a body position so gravity doesnt have an effect on the part and also put a angular velocity like the other guy said

It still doesn’t work it falls through the map

Make it massless

Chatactee lim it

This still doesn’t work for some reason

Increase the maxforce on all axis to 10k

Add a body position, that should keep it in place.