Skip to content

TweenInfo

Summary

Constructors Constructors of a `TweenInfo`.

Properties Properties of a `TweenInfo`.

Constructors

TweenInfo.new(time: Number?, easingStyle: Enum.EasingStyle?, easingDirection: Enum.EasingDirection?, repeatCount: Number?, reverses: Boolean?, delayTime: Number?)

TweenInfo

Returns a TweenInfo data container to be fed into TweenService.

Note that time is in seconds.

All constructor parameters are optional, so not everything has to be specified; note the following defaults:

  • TweenInfo.Time = 1
  • TweenInfo.EasingStyle = Enum.EasingStyle.Quad
  • TweenInfo.EasingDirection = Enum.EasingDirection.Out
  • TweenInfo.RepeatCount = 0
  • TweenInfo.Reverses = false
  • TweenInfo.DelayTime = 0

Properties

Time

Number

Duration for the tween, in seconds.


EasingStyle

Enum.EasingStyle

Easing style for the tween.


EasingDirection

Enum.EasingDirection

Direction in which the tween should execute.


RepeatCount

Number

Number of times the tween repeats.

Note that if repeat count is -1 it will repeat forever.

Set repeatCount to -1 to repeat forever.


Reverses

Boolean

Whether the tween should reverse to the starting value once it reaches its target.


DelayTime

Number

Time before the tween begins, in seconds.


Constructors

new

TweenInfo

TweenInfo.new(time: Number, easingStyle: Enum.EasingStyle, easingDirection: Enum.EasingDirection, repeatCount: Number, reverses: Boolean, delayTime: Number)

Creates a TweenInfo value that configures a Tween.

Parameters

  • time: Number — the duration in seconds.
  • easingStyle: Enum.EasingStyle — the easing curve.
  • easingDirection: Enum.EasingDirection — the easing direction.
  • repeatCount: Number — the number of repeats; -1 repeats forever.
  • reverses: Boolean — whether each repeat reverses direction.
  • delayTime: Number — the delay before playback begins, in seconds.

Testing Notes

TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0) returned a TweenInfo table in both Script and LocalScript in Vortex Studio 0.3.4. Runtime availability may differ in later releases.

repeatCount = -1 is treated as an infinite repeat count.