Tween repeating

Hello, so today i tried to make some tweening stuff, and every times, it always does it 2 times , does anybody know why?
code

function epicTime()

script.Parent.Visible = true
local ti = TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,1,false,1) 

local tween = game:GetService("TweenService"):Create(script.Parent,ti,{BackgroundTransparency=0})
tween:Play()

script.Parent.SIX.Position	= orPos6	
script.Parent.SEVEN.Position = orPos7

six.TextTransparency = 0
seven.TextTransparency = 1

wait(1)
script.Parent.Sound:Play()

six:TweenPosition(toPos,"InOut","Sine",3.5)
seven:TweenPosition(orPos6,"InOut","Sine",3.5)

--local tween = ts:Create(six.TextTransparency,TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut),{TextTransparency = 0})
local tween1 = game:GetService("TweenService"):Create(six,ti,{TextTransparency=1})
local tween = game:GetService("TweenService"):Create(seven,ti,{TextTransparency=0})
tween1:Play()
tween:Play()

end

vid (sorry for the meme at the end , its because of a shortcut lmao) : https://youtu.be/sS6Lat4jkCA

3 Likes

In the TweenInfo variable, the third to last parameter specifies the amount of repeats the tween will do, and the last parameter specifies how many reverses the tween should do. If you want it to tween just once, set the third to last and last parameter to 0. More information can be found here TweenInfo | Documentation - Roblox Creator Hub.

2 Likes

Alright Thank you it worked :slight_smile: also sorry for the loud end Lmao, yo hi from the lumber tycoon 2 disc also XD

1 Like