How do you make a tween rotate a full 360 degrees?

I wanted to make a tween rotate a full 360 degrees. I read this topic already where they split the tween into parts:

However, when I do this, I won’t be able to add easing styles to my tween. If I attempted, it would do that easing style 3 times. So I need to figure out how to do this with one tween. How do I do this?

1 Like

Rotate it to 359* and set it back to 0 after the animation is finished.

Rotate it to 180.0001 degrees In
Rotate it to 0 degrees Out

What if I wanna use an Exponential Out animation?

A hacky solution is to use a NumberValue and tween its Value property instead. Then, use the NumberValue.Changed event to check whenever the value has changed and update the original object’s property by applying the NumberValue’s new value.

2 Likes

I’ll try this!

Not sure. Maybe try setting the tween to go from 0 to 1, but as @Zomebody said, you use a number value and multiply the orientation.

Instead of using CFrames, you could use the orientation property within a part.

local tweenService: TweenService = game:GetService("TweenService")
local tween: Tween = tweenService:Create(script.Parent, TweenInfo.new(1, Enum.EasingStyle.Exponential), {
    Orientation = script.Parent.Orientation + Vector3.new(0, 360, 0)
})

tween:Play()
3 Likes

So like this?

TS:Create(part, TweenInfo.new(0.7, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {part.NumberValue = 360})

NumberValue.Changed(function()
    part.Orientation = NumberValue.Value
end)

Also I recognize the name “Zomebody” lol

This one seems like the most simple solution out of all the others, so I think I’m gonna go with this one. If it doesn’t work for some reason, I’ll try the other solutions. Thanks for helping everyone!

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