# MarkerCurve

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: Instances
- HTML page: https://rapi.sleaze.dev/classes/MarkerCurve/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/MarkerCurve

Represents a list of strings markers in chronological order.

## Properties

### Length

```luau
MarkerCurve.Length: number = 0
```

- Tags: Read only, Read capabilities: Animation, Save only

Returns the number of markers in the MarkerCurve.

### ValuesAndTimes

```luau
MarkerCurve.ValuesAndTimes: string = "\u0002"
```

- Tags: Hidden, Not scriptable, Read capabilities: Animation

## Methods

### GetMarkerAtIndex

```luau
MarkerCurve:GetMarkerAtIndex(index: number): { [string]: any }
```

- Tags: Capabilities: Animation

Returns the time and string value of the marker at the provided index.

Parameters:

- `index`: One-based index of the marker to retrieve, ordered chronologically. Must be within range or the call throws.

Returns: A table containing the time and value of the marker at the provided index.

### GetMarkers

```luau
MarkerCurve:GetMarkers(): { any }
```

- Tags: Capabilities: Animation

Returns the time and string value of all markers in the MarkerCurve.

Returns: An array of tables containing the time and value of all markers in the MarkerCurve.

### InsertMarkerAtTime

```luau
MarkerCurve:InsertMarkerAtTime(time: number, marker: string): { any }
```

- Tags: Capabilities: Animation

Inserts a marker with the provided string value at the provided time.

Parameters:

- `time`: Time at which the marker should be added.
- `marker`: String value associated with this marker.

Returns: A table containing a boolean and a number. The boolean is `true` if the call adds a new marker and `false` if it modifies an existing marker at the provided time. The number is the index of the added marker.

### RemoveMarkerAtIndex

```luau
MarkerCurve:RemoveMarkerAtIndex(startingIndex: number, count: number? = 1): number
```

- Tags: Capabilities: Animation

Remove several markers in the MarkerCurve starting at the provided index.

Parameters:

- `startingIndex`: Index of the first marker to be removed in the MarkerCurve.
- `count`: How many markers to remove starting from the startingIndex.

Returns: How many markers were actually removed (can be less than count if the MarkerCurve was too few markers).

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