Hand-written by Joseph San Nicolas, Roblox Developer
TweenInfo
Constructors
| Name | Description |
| new(time: number,easingStyle: Enum.EasingStyle,easingDirection: Enum.EasingDirection,repeatCount: number,reverses: boolean,delayTime: number) | Returns a new TweenInfo, used to configure how a Tween animates via TweenService:Create(). All parameters are optional: time defaults to 1, easingStyle defaults to Enum.EasingStyle.Quad, easingDirection defaults to Enum.EasingDirection.Out, repeatCount defaults to 0 (a value of -1 repeats indefinitely), reverses defaults to false, and delayTime defaults to 0. |
Code Snippet
local TweenService = game:GetService("TweenService")
local Part = workspace.Part
local tweenInfo = TweenInfo.new(
2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
-1,
true,
0.5
)
local tween = TweenService:Create(Part, tweenInfo, { Position = Part.Position + Vector3.new(0, 10, 0) })
tween:Play()
Properties
| Name | Type | Description |
| Time | number | Duration of the tween, in seconds. Read-only. |
| EasingStyle | Enum.EasingStyle | The style in which the tween executes - the curve used for interpolation. Read-only. |
| EasingDirection | Enum.EasingDirection | The direction in which the tween executes. Read-only. |
| RepeatCount | number | Number of times the tween repeats after its first play. -1 indicates the tween repeats indefinitely. Read-only. |
| Reverses | boolean | Whether the tween interpolates back to its start value after reaching its goal, before repeating. Read-only. |
| DelayTime | number | Time of delay, in seconds, until the tween begins. Read-only. |