Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Which of these two ways to rotate a model is the best way to rotate a model consistently?

I have 2 different ways that work pretty well. I'd like to know which is better, or if there is another that would be better than my current two... And why.

The first one I have used just takes rotates the model by using a while true do loop to set the CFrame

while true do
	wait(0.25)
	model:SetPrimaryPartCFrame(cframe * CFrame.Angles(0, math.rad(90), 0))
end

The second on uses a tween

local Info = TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.In, -1)
local tween = TweenService:Create(DummyValue, Info, {Value = cframe})
tween:Play()

They both do the same thing; I would just like to know which would be "better", I guess which would be more efficient than the other? If any lol. Thanks

1 answer

✓ Accepted answer

I suppose they are both okay, but TweenService is made for transitions and you will have more control over your rotation, not to mention that it's more intuitive. however, I'll do you one better, what if I said that there's a third option that might be even better than both?

Torque.

1 comment

0

You absolutely rock! Thank you!

This discussion is preserved as it was. New answers, comments, and votes are closed.