Tween
Summary
If you are looking to construct a tween, reference TweenService. Then come back here after your tween has been created.
Properties
Instance
InstanceThe object which the tween would act upon.
PlaybackState
Enum.PlaybackStateThe 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.PlaybackStatefor 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, eitherCompletedorCancelled.-- Example of the `Completed` signal being used.myTween.Completed:Connect(function(playbackState)if playbackState == Enum.PlaybackState.Completed thenprint("Tween finished naturally")endend)