Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can anyone teach me how to use TweenStatus?

Asked by
iRexBot 147
6 years ago

I've been trying to learn tween status but there is no example I could use. Could anyone give me an example of it? Thanks in advanced!

1 answer

Log in to vote
1
Answered by
BlupoV2 57
6 years ago

TweenStatus is an Enum that tells you whether a tween was completed or cancelled because another tween overwrote it. It's only used for GUI tweening.

local gui = ...

local function tweenCallback(tweenStatus)
    if tweenStatus == Enum.TweenStatus.Canceled then
        print("tween was cancelled :(")
    elseif tweenStatus == Enum.TweenStatus.Completed then
        print("tween finished :)")
    end
end

gui:TweenSize(_, _, _, _, _, tweenCallback) --> When the tween stops, it'll call tweenCallback with a TweenStatus
Ad

Answer this question