Glorpia Docs
Services

TweenService

Animates supported Instance properties over time using easing.

Accessing TweenService

Luau
local TweenService = game:GetService("TweenService")

GetValue

TweenService:GetValue(alpha, easingStyle?, easingDirection?)
NameTypeDescription
alphanumberInput progress. Values are clamped to the 0 through 1 range.
easingStyleEnum.EasingStyle?Easing curve. Defaults to Quad.
easingDirectionEnum.EasingDirection?Easing direction. Defaults to Out.
returnnumberEased progress value for the selected curve and direction.
Luau
local TweenService = game:GetService("TweenService")
local eased = TweenService:GetValue(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
print(eased)

Create

TweenService:Create(instance, tweenInfo, goals)
NameTypeDescription
instanceInstanceInstance to animate.
tweenInfoTweenInfoDuration, easing, repeat, reverse and delay settings.
goalstableProperty names mapped to target values.
returnTweenTween object controlled with Play(), Pause(), Cancel() and Destroy().

TweenInfo

TweenInfo.new(time, easingStyle?, easingDirection?, repeatCount?, reverses?, delayTime?)
NameTypeDescription
TimenumberDuration of one direction of the tween.
EasingStyleEnum.EasingStyleLinear, Quad, Cubic, Quart, Sine, Back or Bounce.
EasingDirectionEnum.EasingDirectionIn, Out or InOut.
RepeatCountintegerAdditional cycles. A negative value repeats indefinitely.
ReversesbooleanRuns back toward the starting values after reaching the goals.
DelayTimenumberDelay before each cycle starts.

Example: Move A Part

Luau
local TweenService = game:GetService("TweenService")
local part = workspace:FindFirstChild("Part")

if part then
    local tween = TweenService:Create(
        part,
        TweenInfo.new(1.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut),
        { Position = part.Position + Vector3.new(0, 8, 0) }
    )

    tween:Play()
end
Numbers, Vector values and CFrames interpolate over time. Other writable values are assigned when the tween reaches the end.

Tween members

NameTypeDescription
Play()methodStarts a new run or resumes a paused tween.
Pause()methodPauses an active tween.
Cancel()methodStops an active tween and marks it Cancelled.
Destroy()methodCancels the tween.
CompletedsignalFires with the final playback state when the tween completes or is cancelled.
PlaybackStateEnum.PlaybackStateCurrent tween state.