Tween¶
The Tween object controls the playback of an interpolation.
Description¶
The Tween object controls the playback of an interpolation. Creating and configuring a Tween is done with the TweenService.Create() function; 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 an interpolation, a new Tween must be created.
Also note that multiple tweens can be played on the same object at the same time, but they must not be interpolating 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.
Inheritance¶
Object → Instance → TweenBase → Tween
Nova inheritance: Instance → Tween
Properties¶
Instance Supported Property Read-only property that points to the Instance whose properties are being interpolated by the tween.
PlaybackState Supported Property Read-only property that shows the current state for the Tween animation.
Read-only property that shows the current state for the Tween animation.
Read-only property that shows the current stage for the Tween animation. See PlaybackState for descriptions of each state. Change using functions like Tween.Play().
Methods¶
Cancel Supported Function Halts playback and resets the tween variables. If you then call TweenBase.Play(), the properties of the tween resume interpolating towards their dest…
Halts playback and resets the tween variables. If you then call TweenBase.Play(), the properties of the tween resume interpolating towards their destination, but take the full length of the animation to do so.
Halts playback of a Tween and resets the tween variables.
Only resets the tween variables, not the properties being changed by the tween. If you cancel a tween halfway through its animation, the properties do not reset to their original values. Differs from TweenBase.Pause() in that once resumed, it takes the full duration of the tween to complete the animation.
Pause Supported Function Halts playback of the tween. Doesn't reset its progress variables, meaning that if you call TweenBase.Play(), the tween resumes playback from the mom…
Halts playback of the tween. Doesn't reset its progress variables, meaning that if you call TweenBase.Play(), the tween resumes playback from the moment it was paused.
If you want to reset the progress variables of the tween, use TweenBase.Cancel().
You can only pause tweens that are in the
PlaybackState of
Enum. PlaybackState.Playing; tweens in other states won't pause. If a
tween is in a different PlaybackState such
as Enum. PlaybackState.Delayed (as a result of its
TweenInfo.DelayTime being greater than 0), attempting to pause
the tween will fail and the tween will play following its specified delay
time.
Play Supported Function Starts playback of a tween. Note that if playback has already started, calling Play() has no effect unless the tween has finished or is stopped (eith…
Starts playback of a tween. Note that if playback has already started,
calling Play() has no effect unless the tween has finished or is stopped
(either by TweenBase.Cancel() or TweenBase.Pause()).
Multiple tweens can be played on the same object at the same time, but they must not animate the same property. If two tweens attempt to modify the same property, the initial tween is cancelled and overwritten by the most recent tween (see examples).
Events¶
Completed Supported Event Fires when the tween finishes playing or when stopped with TweenBase.Cancel().
Fires when the tween finishes playing or when stopped with TweenBase.Cancel().
Passes the PlaybackState of the tween to any connected functions to
give an indication of why the tween ended. Note that calling
TweenBase.Pause() does not fire the Completed event.
Inherited members¶
Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.
1 modern Roblox member(s) are not implemented yet — expand to inspect
Members declared by Roblox's Tween class (or by a missing base class) that Nova does not expose. Use this list to scope a migration; the compatibility guide has the recommended workaround.
Properties¶
| Member | Signature | Status | Notes | Flags |
|---|---|---|---|---|
TweenInfo |
TweenInfo: TweenInfo |
Not yet | Read-only property that includes information on how the interpolation of the Tween is to be carried out. | ReadOnly, NotReplicated |
Roblox reference: Tween
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.