This class is a Service! It is a top-level singleton which can be retrieved using the
This object cannot be created with the Instance.new constructor function.
Tweens are used to interpolate the properties of instances. These can be used to create animations for various Roblox objects. Almost any numeric property can be tweened using TweenService. Note that only specific types of properties can be used with TweenService. The types of properties that can be tweened are:
TweenService has just one function,
TweenService/Create, which takes information about the animation and generates the
Tween object which can be used to play the animation. Note that
Tweens can animate multiple properties at the same time.
Details on how the interpolation of the tween is to be carried out are given in the tweenInfo parameter of
TweenInfo data type includes a range of properties that can be used to achieve various styles of animation, including reversing and looping
Tweens (see examples).
Multiple tweens can be played on the same object at the same time, but they must not be animating the same property. If two tweens attempt to modify the same property, the initial tween will be cancelled and overwritten by the most recent tween (see examples).
Although other methods exist for tweening objects, such as
GuiObject/TweenSizeAndPosition, TweenService allows multiple properties to be modified and for the animation to be paused and cancelled at any point.
The Create function of
TweenService creates a new Tween. The function takes three arguments: the object to tween, the
TweenInfo to use, and a table containing the properties to tween and the values to tween to.
Calculates a new alpha given an