# TweenService

TweenService : `Instance`

## Overview

TweenService allows the creation of tween Objects for animation effects

The functionality of a tween depends on the properties set during its creation.

<table><thead><tr><th width="180.6666259765625">DataType</th><th>Usage Example</th></tr></thead><tbody><tr><td>CFrame</td><td>CFrame</td></tr><tr><td>Vector3</td><td>Position, Orientation, Size</td></tr><tr><td>Color3</td><td>Color</td></tr><tr><td>number</td><td>Transparency</td></tr><tr><td>bool</td><td>CanCollide</td></tr><tr><td>UDim2</td><td>Position, Size</td></tr></tbody></table>

## Properties

## Methods

### Create

Creates a new tween animation for a specific instance. Arguments passed to the Create() method define the instance to apply the tween to, the TweenInfo defining the tween's behavior, and the properties apply tween to.

#### Parameters

| `Instance` Instance   | The target tween Object                                                  |
| --------------------- | ------------------------------------------------------------------------ |
| `TweenInfo` TweenInfo | An Object that sets the duration, EasingStyle, and repeat count of tween |
| `Value` PropertyTable | A dictionary defining the properties and target values to apply tween to |

#### Return

| `Instance` | The created tween Object |
| ---------- | ------------------------ |

#### Code Samples

```lua
local TweenService = game:GetService("TweenService")
local Part = script.Parent

-- Setting Tween information
local TweenInfoData = TweenInfo.new(
    5,                         -- Time
    Enum.EasingStyle.Linear,   -- EasingStyle
    Enum.EasingDirection.Out,  -- EasingDirection
    0,                         -- Number of repetitions (-1 for infinite)
    false,                     -- Reverses
    0                          -- DelayTime
)

-- Properties to be changed with the tween
local TweenGoals =
{
    Position = Vector3.new(-400, 50, -350)
}

local Tween = TweenService:Create(Part, TweenInfoData, TweenGoals)
Tween:Play()
```

## Events

## See also

{% content-ref url="/pages/4JBNRup7TObw0lJtb37Y" %}
[Tween](/manual/script-manual/advanced-gameplay-systems/tween.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.overdare.com/development/api-reference/classes/tweenservice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
