Reference/Classes/TweenService
Class

TweenService

since 1.6.9-2-alpha

Creates tweens that smoothly interpolate an instance's properties over time.

InheritsInstance

Methods

1

#TweenService:Create(instance: Instance, info: TweenInfo, propertyTable: { string: any }) → Tween

since 1.6.9-2-alpha

Creates a Tween that animates the given properties of instance to their target values. All listed properties must be readable and writable, and numeric types are converted as needed.

Parameters

instanceInstance

The instance whose properties will be tweened.

infoTweenInfo

The timing/easing configuration for the tween.

propertyTable{ string: any }

Map of property name to the value it should hold once the tween finishes.

Errors

  • VMException read failure -- Failed to read backing memory while executing this method.
  • VMException deleted instance -- The supplied instance has been freed or invalidated.
  • VMException unknown property -- A name in propertyTable does not exist on the instance's class.
  • VMException invalid target value -- A value in propertyTable is not assignable to its property type.
  • VMException property not tweenable -- A listed property is not both readable and writable.
  • VMException empty property table -- propertyTable contained no entries.