GUI not rotating 360 degrees

TS = game:GetService("TweenService")
TI = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0)

script.Parent.Rotation = 120

S1 = {Rotation = 120}
S2 = {Rotation = 240}
S3 = {Rotation = 360}

Spin1 = TS:Create(script.Parent,TI,S1)
Spin2 = TS:Create(script.Parent,TI,S2)
Spin3 = TS:Create(script.Parent,TI,S3)

while true do
	wait()
	Spin1:Play()
	wait(1)
	Spin2:Play()
	wait(1)
	Spin3:Play()
	wait(1)
end

Okay so the issue is that i want the gui to rotate a full 360 degrees, but it rotates a bit then reverses backwards instead of constantly going in the same direction why is this happening?

result: https://gyazo.com/27bb174b43fc092d07dc6ed410586f3d

Also this isn’t the issue becuase it was originally 0 but the same thing was still happening

When it goes to 360 degrees, it doesn’t automatically become 0 degrees. When you run the 120 degrees again, instead of spinning forward to 360 + 120 degrees (what you expected), it goes backwards to 120.

To solve this, you could set the rotation of the circle back to 0 like this:

TS = game:GetService("TweenService")
TI = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0)

script.Parent.Rotation = 120

S1 = {Rotation = 120}
S2 = {Rotation = 240}
S3 = {Rotation = 360}

Spin1 = TS:Create(script.Parent,TI,S1)
Spin2 = TS:Create(script.Parent,TI,S2)
Spin3 = TS:Create(script.Parent,TI,S3)

while true do
	wait()
	Spin1:Play()
	wait(1)
	Spin2:Play()
	wait(1)
	Spin3:Play()
	wait(1)
    script.Parent.Rotation = 0
end

tell me if it works

2 Likes

Sorry for the late response, but this works perfectly, thank you for your help!