Skip to content
Roblox API Reference

TweenService

Used to create Tweens which interpolate, or tween, the properties of instances.
  • Not creatable
  • Service
Memory category
Instances
Own members
3
Inherited members
75
Subclasses
0
Siblings
608

Properties23

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Methods45

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byTweenService3
  • TweenService:Create(instance: Instance,tweenInfo: TweenInfo,propertyTable: { [string]: any },): Tween
    Creates a new Tween given the object whose properties are to be tweened, a TweenInfo, and a dictionary of goal property values.
    • Capabilities: Basic
    Parameters
    ParameterDescription
    instance: Instance
    The Instance whose properties are to be tweened.
    tweenInfo: TweenInfo
    The TweenInfo to be used.
    propertyTable: { [string]: any }
    A dictionary of properties, and their target values, to be tweened.
    Returns
    TypeDescription
    Tween
    The newly created Tween configured to interpolate the given properties toward their target values. Call TweenBase:Play() on the returned object to start the tween.
  • TweenService:GetValue(alpha: number,easingStyle: Enum.EasingStyle,easingDirection: Enum.EasingDirection,): number
    Calculates a new alpha given an EasingStyle and EasingDirection.
    • Thread safe
    • Capabilities: Basic
    • Simulation access
    Parameters
    ParameterDescription
    alpha: number
    An interpolation value between 0 and 1.
    easingStyle: Enum.EasingStyle
    The easing style to use.
    easingDirection: Enum.EasingDirection
    The easing direction to use.
    Returns
    TypeDescription
    number
    A new alpha value generated from the given easing style and direction.
  • TweenService:SmoothDamp(current: any,target: any,velocity: any,smoothTime: number,maxSpeed: number?,dt: number?,): (any, any)
    Smoothly interpolates a value towards a target, simulating a critically damped spring.
    • Thread safe
    • Capabilities: Basic
    • Simulation access
    Parameters
    ParameterDescription
    current: any
    The current value to smooth.
    target: any
    The target value to reach.
    velocity: any
    The current velocity with which the current value should approach the target value. You shouldn't modify this value between calls yourself, it's used to store the stateful velocity. In most cases, initialize this with 0, zero, zero, or identity depending on the type, or if needed, with your initial velocity.
    smoothTime: number
    The duration over which the total smoothing operation should take place. Note that since this is a damped spring, there's no guarantee current will be exactly target after this time, but it will be close. Smaller values result in quicker smoothing.
    maxSpeed: number?
    The maximum speed at which the current value should approach the target value. Leaving this nil defaults to huge, meaning the velocity isn't clamped.
    dt: number?
    The rate at which the smoothing operation should be applied. If left nil, the current engine delta time will be used.
    Returns
    TypeDescription
    (any, any)
    The new value and new velocity calculated from the smoothing operation.

Events10

Inherited fromObject1
Inherited fromInstance9