I read that TweenSize "Returns: bool" (http://wiki.roblox.com/index.php?title=API:Class/GuiObject/TweenSize) so after I run the function I want to wait until 'bool' is returned before continuing, but I'm not sure how to read it.
Frame:TweenSize (UDim2.new(0, 0, 0, 0), 2, 0, 4, false) --How do I wait until the above code 'returns bool' before continuing the script? Frame:TweenSize (UDim2.new(0.05, 0, 0.05, 0), 2, 0, 4, false)
The very last parameter of the TweenSize function, along with both TweenPosition and TweenSizeAndPosition can be used to pass a callback function, which executes as soon as the tweening is complete.
It essentially works like so..
function executeAfter () print("Tween complete") end GuiObject:TweenSize(UDim2.new(), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 1, false, executeAfter) -- execute after will be called whenever the tween achieves its endSize, printing "Tween complete" to the output.