Nvm this post. Just passing through, nothing to see here

If you tween a frames position like this:

frame:TweenPosition(UDim2.new(0,100,0,100),"Out","Quad",1) wait(0.1) frame:TweenPosition(UDim2.new(0,200,0,140),"Out","Quad",1)
The script will completely ignore the second tweening. The frame will end up at 0,100,0,100. There is no tweeningComplete event either so avoiding this bug is rather difficult and tedious.

My suggestion is this: Let the most recent tween command override the previous in all cases.
This would make animated GUIs a real breeze :slight_smile:

TweenPosition has 2 parameters you forgot about following after time. The first is the bool to decide if a tween performed on the object will override the other tween. It defaults to false which is why nothing happens. Set it to true and it will override the current tweening process.

The other parameter is a callback parameter thats a function. The function will be called when the tween is finished.

function prin()
print("finished")
end
frame:TweenPosition(UDim2.new(0,100,0,100),"Out","Quad",1,true)
wait(0.1)
frame:TweenPosition(UDim2.new(0,200,0,140),"Out","Quad",1,false,prin)
-> finished

[quote] TweenPosition has 2 parameters you forgot about following after time. The first is the bool to decide if a tween performed on the object will override the other tween. It defaults to false which is why nothing happens. Set it to true and it will override the current tweening process.

The other parameter is a callback parameter thats a function. The function will be called when the tween is finished.

function prin() print("finished") end frame:TweenPosition(UDim2.new(0,100,0,100),"Out","Quad",1,true) wait(0.1) frame:TweenPosition(UDim2.new(0,200,0,140),"Out","Quad",1,false,prin) -> finished [/quote]

Seems like you flipped the overwrite bool.
Here’s your solution:

frame:TweenPosition(UDim2.new(0,100,0,100),"Out","Quad",1,true) wait(0.1) frame:TweenPosition(UDim2.new(0,200,0,140),"Out","Quad",1,true)

Notice how even though the first :TweenPosition has overwrite set to ‘true’, it is still overwritten because of the last :TweenPosition. You could as well just disregard the overwrite bool on the first method call.

As for my habit in this situation - overwrite it! I want it to be overwritten, so I mash up overwrite on each and every :TweenSize/Position/SizeAndPosition that I do. Works nicely.

I shall retreat back in the shadows…
Disappears in the shadows of a random mountain

[quote] TweenPosition has 2 parameters you forgot about following after time. The first is the bool to decide if a tween performed on the object will override the other tween. It defaults to false which is why nothing happens. Set it to true and it will override the current tweening process.

The other parameter is a callback parameter thats a function. The function will be called when the tween is finished.

function prin() print("finished") end frame:TweenPosition(UDim2.new(0,100,0,100),"Out","Quad",1,true) wait(0.1) frame:TweenPosition(UDim2.new(0,200,0,140),"Out","Quad",1,false,prin) -> finished [/quote]

Seems like you flipped the overwrite bool.
Here’s your solution:

frame:TweenPosition(UDim2.new(0,100,0,100),"Out","Quad",1,true) wait(0.1) frame:TweenPosition(UDim2.new(0,200,0,140),"Out","Quad",1,true)

Notice how even though the first :TweenPosition has overwrite set to ‘true’, it is still overwritten because of the last :TweenPosition. You could as well just disregard the overwrite bool on the first method call.

As for my habit in this situation - overwrite it! I want it to be overwritten, so I mash up overwrite on each and every :TweenSize/Position/SizeAndPosition that I do. Works nicely.[/quote]

I think I was confused then. I thought the override stated whether a tween can or can’t overrided. According to you it decides whether the method will or won’t override a tween., correct? Noted.