Want a special badge and 30 bux? Make some PolyWorld! Content and post it in the Creations forum!
Dark mode is incomplete! Please report any issues to the Discord.

TweenModule

LocalScripts Scripts Not creatable

TweenModule animates Part properties over time.
Available as the global TweenModule.

Newer places interpolate only through TweenModule. Older places also auto-tween small direct Position / Color / Size writes unless `workspace.AutoTween` is set false.

While a Part is tweening Position or Rotation, prefer cancelling that tween before setting those properties yourself.

LocalScript tweens only move the Part on that client. Network pose updates are ignored for Position/Rotation/Size while that tween is playing.


Overview

Methods


API

Methods

Tween

Tween(part: Part, goals: table, duration: number, easing: string?) : Tween
Starts a tween on the Part toward the goal properties.
duration is seconds.
easing is optional. Common values: "Linear", "Sine", "Quad", "Cubic".

Supported goal keys include Position, Rotation, Size, Color, and Transparency.

TweenModule:Tween(part, {
    Position = Vector3.new(0, 10, 0),
    Transparency = 0.5,
}, 1.5, "Sine")

Returns a Tween handle for that animation.

Cancel

Cancel(part: Part, property: string?) : void
Stops tweens on the Part.
If property is given (for example "Position" or "Rotation"), only that property's tween is removed.
If omitted, all tweens on the Part are cancelled.

TweenModule:Cancel(part, "Position")
part.Position = Vector3.new(0, 4, 0)

IsTweening

IsTweening(part: Part, property: string?) : bool
Returns true if the Part has an active tween.
If property is given, only that property is checked.


Tween

Handle returned by Tween.

Properties

  • .PlaybackState readonly : string

Methods

  • :Cancel() : void
  • :Pause() : void
  • :Play() : void

Events