Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[Unsolved] Why does this second tween not play?

Simple script, but there is an issue somehow. The "Card:TweenSizeAndPosition(UDim2.new(0.002,0,0.32,0),UDim2.new(0.5,0,0.353,0),"In", "Sine", 5,false, nil) end"-Tween doesn't play.

function Rise()
Card:TweenPosition(UDim2.new(0.419, 0,0.315, 0), "Out","Sine", 5, false,nil)
wait()
Card:TweenSizeAndPosition(UDim2.new(0.002,0,0.32,0),UDim2.new(0.5,0,0.353,0),"In", "Sine", 5,false, nil)
end

3 comments

0

Just do wait(5) since thats how long the first one lasts for

0

Ill try

0

Thanks it worked!

1 answer

The problem is, I don't think you can use 2 :TweenPosition() ...etc. at the same time. I think you could use this:

local goal = {
	Position = UDim2.new(0.419, 0,0.315, 0)
	Size = UDim2.new(0.5,0,0.353,0)
}
local tween = TweenInfo.new(5)
local createTween = game:GetService("TweenService"):Create(Card,tween,goal)
createTween:Play()

This is just an example. Find more on the Roblox Developer pages here:

TweenInfo

TweenService

Happy to help, b_mni.

1 comment

0

Thank you for your answer, but I don't want the tweens to play at the same moment. I want the second tween to play AFTER the first, but it doesn't work.

This discussion is preserved as it was. New answers, comments, and votes are closed.