---
title: "TweenService"
description: "Animates supported Instance properties over time using easing."
canonical: "https://docs.glorpia.com/services/tweenservice"
markdown: "https://docs.glorpia.com/services/tweenservice.md"
---
# TweenService

Animates supported Instance properties over time using easing.

**Category:** Services

## Accessing TweenService

```luau
local TweenService = game:GetService("TweenService")
```

## GetValue

```luau
TweenService:GetValue(alpha, easingStyle?, easingDirection?)
```

| Name | Type | Description |
| --- | --- | --- |
| `alpha` | number | Input progress. Values are clamped to the 0 through 1 range. |
| `easingStyle` | Enum.EasingStyle? | Easing curve. Defaults to Quad. |
| `easingDirection` | Enum.EasingDirection? | Easing direction. Defaults to Out. |
| `return` | number | Eased 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

```luau
TweenService:Create(instance, tweenInfo, goals)
```

| Name | Type | Description |
| --- | --- | --- |
| `instance` | Instance | Instance to animate. |
| `tweenInfo` | TweenInfo | Duration, easing, repeat, reverse and delay settings. |
| `goals` | table | Property names mapped to target values. |
| `return` | Tween | Tween object controlled with Play(), Pause(), Cancel() and Destroy(). |

## TweenInfo

```luau
TweenInfo.new(time, easingStyle?, easingDirection?, repeatCount?, reverses?, delayTime?)
```

| Name | Type | Description |
| --- | --- | --- |
| `Time` | number | Duration of one direction of the tween. |
| `EasingStyle` | Enum.EasingStyle | Linear, Quad, Cubic, Quart, Sine, Back or Bounce. |
| `EasingDirection` | Enum.EasingDirection | In, Out or InOut. |
| `RepeatCount` | integer | Additional cycles. A negative value repeats indefinitely. |
| `Reverses` | boolean | Runs back toward the starting values after reaching the goals. |
| `DelayTime` | number | Delay 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
```

> **Note:** Numbers, Vector values and CFrames interpolate over time. Other writable values are assigned when the tween reaches the end.

## Tween members

| Name | Type | Description |
| --- | --- | --- |
| `Play()` | method | Starts a new run or resumes a paused tween. |
| `Pause()` | method | Pauses an active tween. |
| `Cancel()` | method | Stops an active tween and marks it Cancelled. |
| `Destroy()` | method | Cancels the tween. |
| `Completed` | signal | Fires with the final playback state when the tween completes or is cancelled. |
| `PlaybackState` | Enum.PlaybackState | Current tween state. |
