# GDScript: Groups

Source: https://tweens.gd/gdscript/api/groups/

A `TweensGdGroup` treats several tweens as one step: it pauses, cancels, and completes them together. [Sequences](https://tweens.gd/gdscript/sequences/#play-together) introduces groups.

```gdscript
var step := Tweens.group([
  Tweens.play(sprite, Tweens.position_2d_x(300.0, 0.6)),
  Tweens.play(label, Tweens.modulate_alpha(0.0, 0.6)),
])
await step.end
```

## Create

| Member | Type | Meaning |
| --- | --- | --- |
| [`Tweens.group(handles)`](https://tweens.gd/gdscript/api/groups/#tweens-group-handles) | `TweensGdGroup` | Group running handles, on any targets |
| [`TweensGdGroup.of(handles)`](https://tweens.gd/gdscript/api/groups/#tweensgdgroup-of-handles) | `TweensGdGroup` | The same as `Tweens.group()` |
| [`Tweens.play_all(target, definitions)`](https://tweens.gd/gdscript/api/groups/#tweens-play-all-target-definitions) | `TweensGdGroup` | Start several definitions on one target as a group; see [starting playback](https://tweens.gd/gdscript/api/start/#start) |

## Control

| Member | Type | Meaning |
| --- | --- | --- |
| [`pause()`](https://tweens.gd/gdscript/api/groups/#pause) | `void` | Pause every member |
| [`resume()`](https://tweens.gd/gdscript/api/groups/#resume) | `void` | Resume every member |
| [`is_paused`](https://tweens.gd/gdscript/api/groups/#is-paused) | `bool` | True while every active member is paused; assignable |
| [`cancel()`](https://tweens.gd/gdscript/api/groups/#cancel) | `void` | Cancel every member still playing |

## Status

| Member | Type | Meaning |
| --- | --- | --- |
| [`members`](https://tweens.gd/gdscript/api/groups/#members) | `Array[TweensGdHandle]` | A copy of the grouped handles, without duplicates |
| [`is_terminal`](https://tweens.gd/gdscript/api/groups/#is-terminal) | `bool` | True once the group has ended |
| [`is_settled`](https://tweens.gd/gdscript/api/groups/#is-settled) | `bool` | True once its members have settled as well |
| [`completion_reason`](https://tweens.gd/gdscript/api/groups/#completion-reason) | `Tweens.Reason` | `COMPLETED`, or the reason of the first member that stopped early; `-1` until the group ends |
| [`error`](https://tweens.gd/gdscript/api/groups/#error) | `String` | The members’ failure messages, joined with newlines |
| [`errors`](https://tweens.gd/gdscript/api/groups/#errors) | `Array[String]` | The same messages as a list |

## Awaiting

| Member | Type | Meaning |
| --- | --- | --- |
| [`end`](https://tweens.gd/gdscript/api/groups/#end) | `Variant` | Await it directly: the `ended` signal while running, the reason once the group has ended |
| [`wait(cancellation)`](https://tweens.gd/gdscript/api/groups/#wait-cancellation) | `Tweens.Reason` | Await the reason; the optional [token](https://tweens.gd/gdscript/api/handles/#tweensgdcancellation) cancels only this wait |
| [`ended(reason)`](https://tweens.gd/gdscript/api/groups/#ended-reason) | signal | Emitted once when the group ends |

## Rules

-   If one member stops early or fails, the group cancels the others and keeps that member’s reason.
-   A group has no `state`, `progress`, `target`, or `value`; read its members for those.
-   A group doesn’t link timing: each member keeps its own start and delay. A [Chain](https://tweens.gd/gdscript/api/chains/) plays definitions in order.
