Tweening GUI multiple tweens on same GUI

Hi,

I am trying to Tween a GUI to move from the bottom of the screen to the middle and then from the middle to the far left.

The issue a can’t get past is waiting for the first tween to finish so I can start the second part of the tween as I can’t see a way of doing this in one tween.

Does anyone have some code to show how to do multiple tweening on the same GUI

Have you tried using a Tween.Completed event?

When I got it right you try to override the tween as it is running for example when it’s tweening from the bottom to the middle from the current position to the left side. So you want to interrupt the tween as it runs. Am I right?
If you want to override it mid-action you can just use the built-in override argument inside
TweenPosition(UDim2 endPosition , EasingDirection easingDirection , EasingStyle easingStyle ,float time , bool override , Function callback)

Hi, thanks for the help but I am trying to get each tween running after each other, I have a working script below is this a good way of doing it?

local tweenStatus = Instance.new(“IntValue”)
GuiObject = script.Parent.Parent.Frame

function tweenComplete ()
tweenStatus.Value = tweenStatus.Value + 1
end

tweenStatus.Changed:Connect(function(NewValue)
if NewValue == 1 then
GuiObject:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 1, false, tweenComplete)
end
if NewValue == 2 then
GuiObject:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 1, false, tweenComplete)
end
end)

tweenStatus.Value = 1

Personally I would use the general TweenService rather then the built-in TweenPosition because you can easily do this

local tween = TweenService:Create(GuiObject, Info, {Position = UDim2.fromScale(0.5,0.5)}) 
tween:Play()
tween.Completed:Wait()
TweenService:Create(GuiObject, Info, {Position = UDim2.fromScale(0,0.5)}):Play()

This will bascially yield until the tween is completed so you can save up some lines of code.