How to make the tweenService, when finished do the rest of the script function?

well, I have a question about the tweenService, which is how I can make it so that when the tween finishes, it does the rest of the function, as well as the wait() or something like that: :TweenSize(, 0, 1, 0), nil, nil, 0.5):Wait()


also you have to use tweenservice:create instead of what you are trying to do

else you have to wait(.5) seconds (as per your wait time in the tween you provided) if you don’t go with using tweenservice:create however tweenservice:create is way better.

I don’t know if it’s possible with TweenSize but you could try it with a normal tween.

local TweenService = game:GetService(“TweenService”)
local frame = script.Parent
local Tween = TweenService:Create(frame,,{Size =,0,1,0)})

You can also check out documentation on TweenService.

Actually, it is possible to detect when the Tween will complete if you do call TweenSize/TweenPosition/TweenSizeAndPositionAndWhatever

If you reference a local function & variable which would detect Tweens either Cancelling or Completing, you can check what to do with it:

local function DetectTween(Completed) --This is a bool
    if Completed then
        print("This tween has completed successfully")
        print("This tween was interrupted by another Tween, or cancelled")

local Tween = GuiObject:TweenSize(, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 1, false, DetectTween)

The 6 parameters are as followed in chronological order:

  • The UDim2 you want to Tween
  • The EasingDirection
  • The EasingStyle
  • The Duration of the Tween
  • Permission to Interrupt other Tweens?
  • A callback function (Or basically detecting the Tween’s Status)

1 Like