Tween
Tweens are used to interpolate the properties of instances. The Tween object itself controls the playback of the interpolation. Creating and configuring tweens is done with the TweenService:Create() function. This is the only way to create tweens. Instance.new cannot be used for this particular object.
Memory category | Instances |
---|
Member index 2
Description
Tweens are used to interpolate the properties of instances. The Tween object itself controls the playback of the interpolation. Creating and configuring tweens is done with the TweenService:Create() function. This is the only way to create tweens. Instance.new cannot be used for this particular object.
Note that while the configuration of a tween can be accessed after a tween has been created, it can not be modified. If new goals are needed for interpolation, a new tween must be created. Further information on how to create Tweens can be found on the TweenService page.
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(), Tweens allows multiple properties to be modified and for the animation to be paused and cancelled at any point.
History 10
- 553 Change Default of TweenInfo from to TweenInfo(Time:1 DelayTime:0 RepeatCount:0 Reverses:False EasingDirection:Out EasingStyle:Quad)
- 553 Change Default of Instance from to
- 486 Change ThreadSafety of TweenInfo from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Instance from ReadOnly to ReadSafe
- 462 Change ThreadSafety of TweenInfo from to ReadOnly
- 462 Change ThreadSafety of Instance from to ReadOnly
- 329 Change ValueType of Instance from Object to Instance
- 288 Add TweenInfo
- 288 Add Instance
- 288 Add Tween
Members 2
Instance
Type | Default | |
---|---|---|
Instance |
The Instance property of a Tween points to the Instance whose properties are being interpolated by the tween. As with all Tween properties, the Instance property is read only. If a developer wants to tween a different instance they must create a new Tween using TweenService:Create().
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | false |
TweenInfo
Type | Default | |
---|---|---|
TweenInfo | Time:1 DelayTime:0 RepeatCount:0 Reverses:False EasingDirection:Out EasingStyle:Quad |
Read-only property that includes information on how the interpolation of the Tween is to be carried out, using the TweenInfo data type. The 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).
As with all Tween properties, the TweenInfo property is read only. If a developer wants to modify the TweenInfo of a Tween they must create a new Tween using TweenService:Create().
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | false |