September 20, 2022


Brief Introduction

In the development process of the game, we will use a lot of displacement, rotation and scaling gradient animation, such as the response of buttons, the movement of 3D objects, moving by path, or color gradient, etc. This kind of animation is called tween animation.

The data types that support tween are:
· number
· Vector3
· Vector2
· Color3
· string
· bool


Tween Tween.newInstance instance, TweenInfo tweenInfo, table<string, variant> properties )
Create a tween instance


Instance Instance [ReadOnly]
Example of jogging animation
TweenPlayStatus PlayStatus [ReadOnly]
The playback status of the current jog animation
float TimeScale
Time scaling of jog animation


void Play()
Play jog animation
void Cancel()
Cancel jog animation
void Pause()
Pause jog animation
BindableEvent GetEventstring eventName )
Get jog events


BindableEvent OnCompleted
Animation playback end event

Code example

Create a jog information instance, change the information and view the animation effect

-- Create an instance of easing information with all default values
local tweenInfo =

-- Create an easing animation instance and play it, ins is the instance object for animation, modify the size property of the instance
local tween =, tweenInfo, {scale = 2})

-- Print information when animation playback ends
local completeEvent = tween:GetEvent("OnCompleted")
     print("tween complete!!!")