Skip to content

Tween

Summary

If you are looking to construct a tween, reference TweenService. Then come back here after your tween has been created.

Properties Properties of a `Tween`.

Methods Methods of a `Tween`.

Events

Properties

Instance

Instance

The object which the tween would act upon.


PlaybackState

Enum.PlaybackState

The current state of the tween.

Examples:

  • Enum.PlaybackState.Playing - When the tween is active.
  • Enum.PlaybackState.Cancelled - If the tween was cancelled before it finished.
  • Reference Enum.PlaybackState for more states.

Methods

Play()

Triggers the tween to start/continue playing.


Pause()

Pauses the tween where it is at and will continue once Tween:Play() is called again.


Cancel()

Stops the tween where it is at and resets the tween to the start position.


Events

.Completed(playbackState: Enum.PlaybackState)

Fires when the tween finishes, whether it completed naturally or was stopped early with Cancel().

The connected function receives one argument: the resulting Enum.PlaybackState, either Completed or Cancelled.

-- Example of the `Completed` signal being used.
myTween.Completed:Connect(function(playbackState)
if playbackState == Enum.PlaybackState.Completed then
print("Tween finished naturally")
end
end)