How do i use orientation properly?

Hey, so i have never actually tried to use orientation before until now. I am trying to make a spinning block but the spinning is not that smooth. Here is a video:

robloxapp-20200530-0920364.wmv (395.7 KB)

here is my tween service code:

local TweenService = game:GetService("TweenService")

local part = script.Parent

local info = TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 10000000,true, 0.5)

local goal = {Orientation = Vector3.new(0, -90, 0)
}

local tween = TweenService:Create(part, info, goal)


tween:Play()

First of all, to keep a tween going for ever, just switch the repeat count to a negative number. (Change 100000 to -1).

Plus, it doesn’t spin all the way around. If you want to create a spinning part, you set it from 180 to -180 (or something close to that) and don’t set reverse to true, set it to false.

Another way without the TS is (although, not recommended since there’s no easing styles):

while true do

    part.CFrame = part.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.1, 0) --put 0.1 wherever you feel like should be the direction that your part should spin

end
1 Like

Set it to 180, and the tween is pretty smooth except when it does complete a spin, it stops for a second and restarts.