# Tween

Tween : `TweenBase`

## Overview

Tween Objects are used to gradually change property values over time for animation effects.

Once set, a tween's goal cannot be modified, and multiple tweens cannot be applied to the same property simultaneously. If multiple tweens target the same property, the existing tween is canceled, and the latest tween takes precedence

## Properties

### Instance

`Instance`

Retrieves the instance set for the tween Object (read-only).

#### Code Samples

```lua
print(Tween.Instance)
```

### TweenInfo

`TweenInfo`

Retrieves the TweenInfo set for the tween Object (read-only).

#### Code Samples

```lua
local tweenInfo = Tween.TweenInfo
print(tweenInfo.Time)
print(tweenInfo.EasingStyle)
print(tweenInfo.EasingDirection)
print(tweenInfo.RepeatCount)
print(tweenInfo.Reverses)
print(tweenInfo.DelayTime)
```

## Methods

### Cancel

Stops the tween's playback and resets its internal state.

Property values changed by the tween are not reverted to their initial values.

#### Parameters

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

```lua
Tween:Cancel()
```

### Pause

Pauses a playing tween when its state is Playing. The tween's internal state, including progress, is not reset, so calling Play() method resumes from the paused point.

#### Parameters

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

```lua
Tween:Pause() -- Pause
wait(2)

Tween:Play()  -- Resume
```

### Play

Starts the tween's playback.

If already playing, calling Play() method has no effect. If playback is completed or stopped via Cancel() or Pause() method, this function can restart it.

Multiple tweens with different properties can run simultaneously on the same Object, but if two tweens target the same property, the existing tween is canceled, and only the latest tween runs.

#### Parameters

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

```lua
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/tween.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.
