Tween is repeating even though it shouldnt be

So this tween works. It moves to another position like a sliding door. But it repeats even though it set to 0. The tween moves torwards the part but then moves back to its starting postion…

wait(3)


local TweenService = game:GetService("TweenService")
local tweenPart = script.Parent.Door1

local info = TweenInfo.new(
	1,           
	Enum.EasingStyle.Linear,     
	Enum.EasingDirection.In,   
	0,           
	true,               
	0                    
)

local Goals = {           
	Position = script.Parent.Door2.Position 
	
	

}

local PartTween = TweenService:Create(tweenPart, info, Goals) 
PartTween:Play() 

Your bool is set to true == reverses so idk why it would be repeating other than that

the value above the bool is if <0 then repeat indefinitely

2 Likes

Im an idiot. Oh lord how did I not notice that?!?!?!?!

local tweenInfo = TweenInfo.new(
	1, -- Time
	Enum.EasingStyle.Linear, -- EasingStyle
	Enum.EasingDirection.In, -- EasingDirection
	0, -- RepeatCount (when less than zero the tween will loop indefinitely)
	true, -- Reverses (tween will reverse once reaching it's goal)
	0 -- DelayTime
)

Your Reverses parameter is true, which causes the tween to reverse. It needs to be set to false.

2 Likes