TweenPosition Isnt working after using TweenSizeAndPosition

Im trying to Tween Image Labels in then they are suppose to go out to the left.

Heres the code:

 local num3 = script.Parent.Num3
    local num2 = script.Parent.Num2
    local num1 = script.Parent.Num1
    local duel = script.Parent.Duel

local StatsusCheck = game:GetService("ReplicatedStorage"):WaitForChild("Status")
wait(7)
--StatsusCheck:GetPropertyChangedSignal("Value"):Connect(function()
	--if StatsusCheck.Value == "Get Ready to Play!" then
		--[[
		num3.AnchorPoint = Vector2.new(0.5,0.5)
		num2.AnchorPoint = Vector2.new(0.5,0.5)
		num1.AnchorPoint = Vector2.new(0.5,0.5)
		duel.AnchorPoint = Vector2.new(0.5,0.5) 
												--	]]
		num3:TweenSizeAndPosition(UDim2.new(0,100,0,100), UDim2.new(0.5,0,0.5,0), "In", "Back", 0.7)
		wait(0.3)
		num3:TweenPosition(UDim2.new(1,0,1,0),"Out", "Back",0.3)
		wait(0.7)
		num2:TweenSizeAndPosition(UDim2.new(0,100,0,100), UDim2.new(0.5,0,0.5,0), "In", "Back", 0.7)
		wait(0.3)
		num2:TweenPosition(UDim2.new(1,0,1,0),"Out", "Back",0.3)
		wait(0.7)
		num1:TweenSizeAndPosition(UDim2.new(0,100,0,100), UDim2.new(0.5,0,0.5,0), "In", "Back", 0.7)
		wait(0.3)
		num1:TweenPosition(UDim2.new(1,0,1,0),"Out", "Back",0.3)
		wait(0.1)
		duel:TweenSizeAndPosition(UDim2.new(0,300,0,100), UDim2.new(0.5,0,0.5,0), "In", "Back", 0.7)
		wait(0.5)
		duel:TweenSize(UDim2.new(0,0,0,0),"Out", "Back",0.3)
	--end
--end)
1 Like

All of the tween functions have an override parameter which allows them to play even if the object is already being tweened; it defaults to false. Your first tween is 0.7 seconds long and only allows 0.3 seconds before initiating the next one, so the second one will have no effect. That being said, you have two options: set the override argument to true (just throw it on at the end), or increase the wait time to match the duration of the preceding tween.

2 Likes

I may have spotted the issue. You are tweening num3 's size and position but you do not give it enough time for it to be finished. The wait is too short, and the tween cannot finish. After, trying to tween num3’s position may not work because the tween above is being interrupted.

You can add a true at the end of the tween function after the time wait to make it so that it can be overridden.
I hope that helps :smile:

1 Like

ive set everything to true and commented out the waits but now it dosent even Tween

You can keep the waits; otherwise, the last tween will override all of the others.

Thank you. Btw everything is working with False and the Waits.