TweenBase

TweenBase : Instance

Overview

The parent class for tween Objects created by the TweenService:Create() method

Properties

PlaybackState

Enum.PlaybackState

The current state of the tween (read-only).

Code Samples

print(Tween.PlaybackState)

Methods

Cancel

The Stops the tween's playback and resets its internal state.

Property values changed by the tween are not reverted to their initial values.

Parameters

Return

void

Code Samples

Pause

Pauses a playing tween when its state is Playing. The tween's internal state, including progress, is not reset, so calling Play() method resumes from the paused point.

Parameters

Return

void

Code Samples

Play

Starts the tween's playback.

If already playing, calling Play() method has no effect. If playback is completed or stopped via Cancel() or Pause() method, this function can restart it.

Multiple tweens with different properties can run simultaneously on the same Object, but if two tweens target the same property, the existing tween is canceled, and only the latest tween runs.

Parameters

Return

void

Code Samples

Events

Completed

Runs when the tween completes its playback or is stopped by Cancel().

Passes the reason for tween termination to the connected function.

Parameters

Enum.PlaybackState playbackState

The state of the tween upon termination

Code Samples

See also

Tween

Last updated