# Keyframe

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/Keyframe/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/Keyframe

A Keyframe holds the `Poses` applied to joints in a [`Model`](https://rapi.sleaze.dev/classes/Model.md) at a given point of time in an animation. `Keyframes` are interpolated between during animation playback.

## Properties

### Time

```luau
Keyframe.Time: number = 0
```

- Tags: Read capabilities: Animation

The [`Keyframe`](https://rapi.sleaze.dev/classes/Keyframe.md) time position (in seconds) in an animation. This determines the time at which the `Poses` inside the keyframe will be shown.

## Methods

### AddMarker

```luau
Keyframe:AddMarker(marker: Instance)
```

- Tags: Capabilities: Animation

Adds a [`KeyframeMarker`](https://rapi.sleaze.dev/classes/KeyframeMarker.md) to the [`Keyframe`](https://rapi.sleaze.dev/classes/Keyframe.md) by parenting it to the keyframe.

Parameters:

- `marker`: The [`KeyframeMarker`](https://rapi.sleaze.dev/classes/KeyframeMarker.md) being parented to the [`Keyframe`](https://rapi.sleaze.dev/classes/Keyframe.md).

### AddPose

```luau
Keyframe:AddPose(pose: Instance)
```

- Tags: Capabilities: Animation

Adds a [`Pose`](https://rapi.sleaze.dev/classes/Pose.md) to the [`Keyframe`](https://rapi.sleaze.dev/classes/Keyframe.md) by parenting it to the keyframe.

Parameters:

- `pose`: The [`Pose`](https://rapi.sleaze.dev/classes/Pose.md) to be added.

### GetMarkers

```luau
Keyframe:GetMarkers(): { Instance }
```

- Tags: Capabilities: Animation

Returns an array containing all `KeyframeMarkers` that have been added to the [`Keyframe`](https://rapi.sleaze.dev/classes/Keyframe.md).

Returns: An array containing all `KeyframeMarkers` that have been added to the [`Keyframe`](https://rapi.sleaze.dev/classes/Keyframe.md).

### GetPoses

```luau
Keyframe:GetPoses(): { Instance }
```

- Tags: Capabilities: Animation

Returns an array containing all `Poses` that have been added to a [`Keyframe`](https://rapi.sleaze.dev/classes/Keyframe.md).

Returns: An array of `Poses`.

### RemoveMarker

```luau
Keyframe:RemoveMarker(marker: Instance)
```

- Tags: Capabilities: Animation

Removes a [`KeyframeMarker`](https://rapi.sleaze.dev/classes/KeyframeMarker.md) from the [`Keyframe`](https://rapi.sleaze.dev/classes/Keyframe.md) by settings its [`Instance.Parent`](https://rapi.sleaze.dev/classes/Instance.md) to `nil`.

Parameters:

- `marker`: The marker being removed from the [`Keyframe`](https://rapi.sleaze.dev/classes/Keyframe.md).

### RemovePose

```luau
Keyframe:RemovePose(pose: Instance)
```

- Tags: Capabilities: Animation

Removes a [`Pose`](https://rapi.sleaze.dev/classes/Pose.md) from the [`Keyframe`](https://rapi.sleaze.dev/classes/Keyframe.md) by setting its [`Instance.Parent`](https://rapi.sleaze.dev/classes/Instance.md) to `nil`.

Parameters:

- `pose`: The [`Pose`](https://rapi.sleaze.dev/classes/Pose.md) to be removed.

## 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`
