Stop

Constructor:

Stop()

Description

Stops a Tween animation.

Examples

Use the following code. It can be added to a server or client script. The code is to create a part and an animation for the part to play. Play the animation after creating a Tweener object, and stop the animation 4 seconds later.

local part = RWObject.Create("Part")
part.Name = "RE"
part.Parent = WorkSpace
local tweenInfo = 
{
    duration = 6000, -- unit: ms
    repeatCount = 1, -- repeat times, -1 for no limit
    easing = "inSine", -- animation playing type
    yoyo = true, -- animation loop type
    delay = 1000 -- delay for repeated playing
}

local action = {
    Position = Vector3.New(20, 0, 20), 
    Rotation = Vector3.New(0, 90, 0), 
    Color = Vector3.New(0, 255, 0)
    }
local tween = TweenServiceJS:CreateTween(part, tweenInfo,action)
tween:Play()
wait(4)
tween:Stop()