# GDScript: Sequences

Source: https://tweens.gd/gdscript/sequences/

A Chain plays motions one after another on one target’s timeline. A Group plays them at the same time.

Examples use the global `Tweens` class in a node script, with targets inside the scene tree.

## Play in order

```gdscript
var animation := Tweens.chain(sprite, [
    Tweens.position_2d([400, 180], 0.6),
    Tweens.scale_2d([1.2, 1.2], 0.2),
    Tweens.modulate_alpha(0.0, 0.3),
])
await animation.end
```

The sprite moves, grows, then fades. Each step reads its starting value when it begins, so it continues from where the previous step ended.

## Overlap and gaps

An entry’s `delay` counts from the end of the entry before it. A positive delay leaves a gap; a negative one overlaps.

```gdscript
var animation := Tweens.chain(sprite, [
    Tweens.position_2d([400, 180], 0.6),
    Tweens.modulate_alpha(0.0, 0.3).with_delay(-0.2),
])
```

1.  **Move** from 0 to 0.6 seconds.
2.  **Fade** from 0.4 to 0.7 seconds, overlapping the move’s last 0.2 seconds.

## Play together

```gdscript
var together := Tweens.play_all(sprite, [
    Tweens.position_2d([400, 180], 0.6),
    Tweens.modulate_alpha(0.0, 0.6),
])
await together.end
```

`Tweens.play_all()` returns a Group. To group tween handles from different targets, use `Tweens.group([first, second])`. A Group ends when all its members have ended; if one stops early, the Group cancels the rest.

Chain or await?

Await between steps that wait on a decision, input, or another target. Use a Chain when steps share one timeline: a tween started after an await begins on the next update.

[Chains](https://tweens.gd/gdscript/api/chains/)Pre-roll, capture order, controls, and limits.

[Groups](https://tweens.gd/gdscript/api/groups/)Membership, controls, and completion rules.
