# AnimationController

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: Animation
- HTML page: https://rapi.sleaze.dev/classes/AnimationController/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/AnimationController

Allows animations to be loaded and applied to a character or model in place of a [`Humanoid`](https://rapi.sleaze.dev/classes/Humanoid.md).

## Methods

### GetPlayingAnimationTracks

```luau
AnimationController:GetPlayingAnimationTracks(): { any }
```

- Tags: Deprecated, Capabilities: Animation
- Use instead: [`AnimationController.GetPlayingAnimationTracks`](https://rapi.sleaze.dev/classes/AnimationController.md)

**Deprecated:**

Returns an array of all `AnimationTracks` that are currently being played by the [`AnimationController`](https://rapi.sleaze.dev/classes/AnimationController.md).

Returns: An array of playing `AnimationTracks`.

### LoadAnimation

```luau
AnimationController:LoadAnimation(animation: Animation): AnimationTrack
```

- Tags: Deprecated, Capabilities: Animation
- Use instead: [`AnimationController.LoadAnimation`](https://rapi.sleaze.dev/classes/AnimationController.md)

**Deprecated:** This function is deprecated in favor of using [`Animator:LoadAnimation()`](https://rapi.sleaze.dev/classes/Animator.md) directly (the [`Animator`](https://rapi.sleaze.dev/classes/Animator.md) may be created while editing or at runtime).

Loads an [`Animation`](https://rapi.sleaze.dev/classes/Animation.md) onto an [`AnimationController`](https://rapi.sleaze.dev/classes/AnimationController.md), returning an [`AnimationTrack`](https://rapi.sleaze.dev/classes/AnimationTrack.md) that can be used for playback.

Parameters:

- `animation`: The [`Animation`](https://rapi.sleaze.dev/classes/Animation.md) to be used.

## Events

### AnimationPlayed

```luau
AnimationController.AnimationPlayed: RBXScriptSignal<(animationTrack: AnimationTrack)>
```

- Tags: Deprecated, Capabilities: Animation
- Use instead: [`AnimationController.AnimationPlayed`](https://rapi.sleaze.dev/classes/AnimationController.md)

**Deprecated:**

Fires whenever the [`AnimationController`](https://rapi.sleaze.dev/classes/AnimationController.md) begins playing an animation. It returns the [`AnimationTrack`](https://rapi.sleaze.dev/classes/AnimationTrack.md) playing.

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
