Collapse Sidebar


Smoothly resizes a GUI to a new DataType/UDim2 in the specified time using the specified Enum/EasingDirection|EasingDirection and Enum/EasingStyle|EasingStyle.

This function will return whether the tween will play. Normally this will always return true, but it will return false if another tween is active and override is set to false.

See also

  • GuiObject/TweenPosition, tweens a GUI’s position
  • GuiObject/TweenSizeAndPosition, tweens a GUI’s size and position synchronously


Name Type Default Description

The size that the GUI should resize


The direction in which to ease the GUI to the endSize


The style in which to ease the GUI to the endSize


How long, in seconds, the tween should take to complete


Whether the tween will override an in-progress tween


A callback function to execute when the tween completes


Return Type Summary

Whether the tween will play

Code Samples

Tween a GuiObject's Size

This code sample demonstrates the usage of the GuiObject/TweenSize function. It initiates an animation on the parent’s GuiObject/Size property to UDim2.new(0.5, 0, 0.5, 0), which is half the GuiObject's parent size on both axes.

Additionally, it demonstrates how the callback parameter can be used to detect when the tween stops (whether it was cancelled by another tween or completed).