Play

Constructor:

Play()

Description

Plays the Tween animation from the current position.

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.

local part = RWObject.Create("Part")
part.Name = "RE"
part.Parent = WorkSpace
local tweenInfo = 
{
    duration = 2000, -- unit: ms
    repeatCount = 3, -- 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()