How do I fix this spin tween with a mesh part?

Hellooooo, I have this little spinny wheel thingy. Its purely for decoration so it isnt a big deal, but im having issues with its spinning.

repeat
	task.wait()
until game:GetService("ReplicatedStorage").GameLoaded.OnServerEvent

local TS = game:GetService("TweenService")

script.Parent.Triggered:Connect(function()
	script.Parent.Parent.Sound:Play()
	script.Parent.Enabled = false
	local thing = 0.1
	repeat
		print("repeat"..thing)
		local spin = TS:Create(script.Parent.Parent, TweenInfo.new(thing, Enum.EasingStyle.Linear), {Orientation = script.Parent.Parent.Orientation - Vector3.new(90, 0, 0)})
		spin:Play()
		spin.Completed:Wait()
		thing += 0.1
	until thing >= 1
	script.Parent.Enabled = true
end)


It just bounces back and forth. I’ve used similar code on other objects and it works fine
ex:

while true do
	local Spin1 = TS:Create(script.Parent, TweenInfo.new(2, Enum.EasingStyle.Linear), {Orientation = script.Parent.Orientation + Vector3.new(0, 90, 0)})
	Spin1:Play()
	Spin1.Completed:Wait()
end
1 Like

Change the - to a + and it should work, I tested it in studio, heres what I did, its the same thing as your top one but without the spinning rotation stopping part.

while true do	
	local spin = game.TweenService:Create(script.Parent, TweenInfo.new(1, Enum.EasingStyle.Linear), {Orientation = script.Parent.Orientation + Vector3.new(90, 0, 0)})
	spin:Play()
	spin.Completed:Wait()	
end
1 Like

i did that and it has the same problem just going in the other direction

Just make it go 360 degrees instead of 90, it will just go a little faster.

1 Like

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