Playback and control

After creating a new tween, you can use the following methods:

  • Start

  • Stop

  • Reset

  • Destroy

Example usage:

local tween = Tween(workspace.Part, {Transparency = 1}, {Time = 2})
tween:Start() -- Initial playback start.
task.wait(1)
tween:Stop() -- Stop after 1 second of playback.
task.wait(1)
tween:Start() -- Resume after a 1 second pause.
local tween = Tween(workspace.Part, {Transparency = 1}, {Time = 2})
tween:Start() -- Initial playback start.
task.wait(1)
tween:Reset() -- Reset after 1 second of playback.
tween:Start() -- Start playback from the beginning again.
task.wait(1)
tween:Destroy() -- Throw the tween in the trash!

Last updated