Skip to main content

AnimationsClient

This item only works when running on the client. Client
NOTE

Roblox model path: Animations\Package\AnimationsClient

Types

initOptions

interface initOptions {
AutoLoadAllPlayerTracksfalse
AutoRegisterPlayertrue
BootstrapDepsFolderFolder?
TimeToLoadPrintstrue
}

For more info, see Properties.

path

type path = {any} | string

These are all valid forms of paths to animation tracks you have defined in the AnimationIds module:

local path = "Jump" -- A single key (any type)

local path = {"Dodge", Vector3.xAxis} -- An array path (values of any type)

local path = "Climb.Right" -- A string path separated by "."

Animations:PlayTrack(path)

customRBXAnimationIds

interface customRBXAnimationIds {
runnumber?
walknumber?
jumpnumber?
idle{
Animation1number?,
Animation2number?
}?
fallnumber?
swimnumber?
swimIdlenumber?
climbnumber?
}

A table of animation ids to replace the default roblox animation ids.

NOTE

The "walk" animation is used for both walking and running on R6 characters.

humanoidRigTypeToCustomRBXAnimationIds

interface humanoidRigTypeToCustomRBXAnimationIds {
[Enum.HumanoidRigType.R6]customRBXAnimationIds?
[Enum.HumanoidRigType.R15]customRBXAnimationIds?
}

A table mapping a Enum.HumanoidRigType to its supported animation ids that will replace the default roblox animation ids.

Properties

AutoLoadAllPlayerTracks

AnimationsClient.AutoLoadAllPlayerTracks: false

If set to true, client animation tracks will be loaded each time the client spawns.

AutoRegisterPlayer

AnimationsClient.AutoRegisterPlayer: true

If set to true, the client will be auto registered with rigType of "Player" each time they spawn.

BootstrapDepsFolder

AnimationsClient.BootstrapDepsFolder: Folder?

Set this to the dependencies folder if you have moved it from its original location inside of the root Animations folder.

TimeToLoadPrints

AnimationsClient.TimeToLoadPrints: true

If set to true, makes helpful prints about the time it takes to pre-load and load animations.

PreloadAsyncProgressed

AnimationsClient.PreloadAsyncProgressed: RBXScriptSignal

Fires when ContentProvider:PreloadAsync() finishes pre-loading one animation instance.

Animations.PreloadAsyncProgressed:Connect(function(n, total, loadedAnimInstance)
	print("ContentProvider:PreloadAsync() finished pre-loading one animation:", n, total, loadedAnimInstance)
end)

Functions

Init

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
AnimationsClient:Init(initOptionsinitOptions?) → ()

Initializes AnimationsClient.

Yields when...

  • ...server has not initialized.
  • ...animations are being pre-loaded with ContentProvider:PreloadAsync() (could take a while).
important

Must be called once before any other method.

GetTrackStartSpeed

AnimationsClient:GetTrackStartSpeed(pathpath) → number?

If set with HasProperties, returns the animation track's StartSpeed.

Rig version - :GetRigTrackStartSpeed()

GetTimeOfMarker

AnimationsClient:GetTimeOfMarker(
animTrack_or_IdStringAnimationTrack | string,
markerNamestring
) → number?

This method can yield if the initialization process that caches all of the marker times is still going on when this method is called. If after 3 seconds the initialization process has still not finished, this method will return nil.

WARNING

This method only works on animations which you give the MarkerTimes property to.

local attackAnim = Animations:PlayTrack("Attack")
local timeOfHitStart = Animations:GetTimeOfMarker(attackAnim, "HitStart")

print("Time of hit start:", timeOfHitStart)

-- or

local animIdStr = Animations:GetAnimationIdString("Player", "Attack")
local timeOfHitStart = Animations:GetTimeOfMarker(animIdStr, "HitStart")

print("Time of hit start:", timeOfHitStart)

GetAnimationIdString

AnimationsClient:GetAnimationIdString(
rigTyperigType,
pathpath
) → string

Returns the animation id string under rigType at path in the AnimationIds module.

local animIdStr = Animations:GetAnimationIdString("Player", "Run")
print(animIdStr) --> "rbxassetid://89327320"

FindFirstRigPlayingTrack

AnimationsClient:FindFirstRigPlayingTrack(
rigModel,
pathpath
) → AnimationTrack?

Returns a playing animation track found in rig.Humanoid.Animator:GetPlayingAnimationTracks() matching the animation id found at path in the AnimationIds module or nil.

WARNING

For this to work, rig needs to be registered.

local isBlocking = Animations:FindFirstRigPlayingTrack(rig, "Blocking")

if isBlocking then
	warn("We can't hit the enemy, they're blocking!")
end

WaitForRigPlayingTrack

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
AnimationsClient:WaitForRigPlayingTrack(
rigModel,
pathpath,
timeoutnumber?
) → AnimationTrack?

Yields until a playing animation track is found in rig.Humanoid.Animator:GetPlayingAnimationTracks() matching the animation id found at path in the AnimationIds module then returns it or returns nil after timeout seconds if provided.

Especially useful if the animation needs time to replicate from server to client and you want to specify a maximum time to wait until it replicates.

WARNING

For this to work, rig needs to be registered.

local isBlocking = Animations:WaitForRigPlayingTrack(rig, "Blocking", 1)

if isBlocking then
	warn("We can't hit the enemy, they're blocking!")
end

GetAppliedProfileName

AnimationsClient:GetAppliedProfileName() → string?

Returns the client's currently applied animation profile name or nil.

Rig version - :GetRigAppliedProfileName()

AwaitPreloadAsyncFinished

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
AnimationsClient:AwaitPreloadAsyncFinished() → {Animation?}

Yields until ContentProvider:PreloadAsync() finishes pre-loading all animation instances.

local loadedAnimInstances = Animations:AwaitPreloadAsyncFinished()
	
print("ContentProvider:PreloadAsync() finished pre-loading all animations:", loadedAnimInstances)

Register

AnimationsClient:Register() → ()

Registers the client's character so that methods using animation tracks can be called.

rig version

:RegisterRig()

TIP

Automatically calls rig:SetAttribute("AnimationsRigType", rigType) which is useful for determining rig types.

AwaitRegistered

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
AnimationsClient:AwaitRegistered() → ()

Yields until the client gets registered.

Rig version - :AwaitRigRegistered()

IsRegistered

AnimationsClient:IsRegistered() → boolean

Returns true if the client is registered.

Rig version - :IsRigRegistered()

ApplyCustomRBXAnimationIds

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
AnimationsClient:ApplyCustomRBXAnimationIds(humanoidRigTypeToCustomRBXAnimationIdshumanoidRigTypeToCustomRBXAnimationIds) → ()

Applies the animation ids specified in the humanoidRigTypeToCustomRBXAnimationIds table on the client's character.

Yields when...

  • ...the client's character, humanoid, animator, or animate script aren't immediately available.
Animations:ApplyCustomRBXAnimationIds({
	[Enum.HumanoidRigType.R15] = {
		jump = 656117878,
		idle = {
			Animation1 = 656117400,
			Animation2 = 656118341
		}
	}
})
rig version

:ApplyRigCustomRBXAnimationIds()

WARNING

Only works for R6/R15 rigs that are local to the client or network-owned by the client and have a client-side "Animate" script in their model.

GetAnimationProfile

AnimationsClient:GetAnimationProfile(animationProfileNamestring) → animationProfilehumanoidRigTypeToCustomRBXAnimationIds?

Returns the humanoidRigTypeToCustomRBXAnimationIds table from the animation profile module or nil.

INFO

For more info, see animation profiles.

ApplyAnimationProfile

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
AnimationsClient:ApplyAnimationProfile(animationProfileNamestring) → ()

Applies the animation ids found in the animation profile on the client's character.

Yields when...

  • ...the client's character, humanoid, animator, or animate script aren't immediately available.
INFO

For more info, see animation profiles.

rig version

:ApplyRigAnimationProfile()

WARNING

Only works for R6/R15 rigs that are local to the client or network-owned by the client and have a client-side "Animate" script in their model.

AwaitAllTracksLoaded

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
AnimationsClient:AwaitAllTracksLoaded() → ()

Yields until the client has been registered and then until all animation tracks have loaded.

Rig version - :AwaitAllRigTracksLoaded()

AwaitTracksLoadedAt

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
AnimationsClient:AwaitTracksLoadedAt(pathpath) → ()

Yields until the client has been registered and then until all animation tracks have loaded at path.

Rig version - :AwaitRigTracksLoadedAt()

AreAllTracksLoaded

AnimationsClient:AreAllTracksLoaded() → boolean

Returns true if the client has had all its animation tracks loaded.

Rig version - :AreAllRigTracksLoaded()

AreTracksLoadedAt

AnimationsClient:AreTracksLoadedAt(pathpath) → boolean

Returns true if the client has had its animation tracks loaded at path.

Rig version - :AreRigTracksLoadedAt()

LoadAllTracks

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
AnimationsClient:LoadAllTracks() → ()

Creates animation tracks from all animation ids in AnimationIds for the client.

Yields when...

  • ...client's animator is not a descendant of game.

Rig version - :LoadAllRigTracks()

LoadTracksAt

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
AnimationsClient:LoadTracksAt(pathpath) → ()

Creates animation tracks from all animation ids in AnimationIds for the client at path.

Yields when...

  • ...client's animator is not a descendant of game.

Rig version - :LoadRigTracksAt()

GetTrack

AnimationsClient:GetTrack(pathpath) → AnimationTrack?

Returns a client animation track or nil.

Rig version - :GetRigTrack()

PlayTrack

AnimationsClient:PlayTrack(
pathpath,
fadeTimenumber?,
weightnumber?,
speednumber?
) → AnimationTrack

Returns a playing client animation track.

rig version

:PlayRigTrack()

Animations:RegisterRig(rig, "Monster") -- In order to use "Monster" animations (in AnimationIds) on this rig

Animations:LoadAllRigTracks(rig)
Animations:PlayRigTrack(rig, "Run")

StopTrack

AnimationsClient:StopTrack(
pathpath,
fadeTimenumber?
) → AnimationTrack

Returns a stopped client animation track.

Rig version - :StopRigTrack()

StopPlayingTracks

AnimationsClient:StopPlayingTracks(fadeTimenumber?) → {AnimationTrack?}

Returns the stopped client animation tracks.

Rig version - :StopRigPlayingTracks()

GetPlayingTracks

AnimationsClient:GetPlayingTracks() → {AnimationTrack?}

Returns the playing client animation tracks.

Rig version - :GetRigPlayingTracks()

StopTracksOfPriority

AnimationsClient:StopTracksOfPriority(
animationPriorityEnum.AnimationPriority,
fadeTimenumber?
) → {AnimationTrack?}

Returns the stopped client animation tracks.

Rig version - :StopRigTracksOfPriority()

GetTrackFromAlias

AnimationsClient:GetTrackFromAlias(aliasany) → AnimationTrack?

Returns a client animation track or nil.

Rig version - :GetRigTrackFromAlias()

PlayTrackFromAlias

AnimationsClient:PlayTrackFromAlias(
aliasany,
fadeTimenumber?,
weightnumber?,
speednumber?
) → AnimationTrack

Returns a playing client animation track.

Rig version - :PlayRigTrackFromAlias()

StopTrackFromAlias

AnimationsClient:StopTrackFromAlias(
aliasany,
fadeTimenumber?
) → AnimationTrack

Returns a stopped client animation track.

Rig version - :StopRigTrackFromAlias()

SetTrackAlias

AnimationsClient:SetTrackAlias(
aliasany,
pathpath
) → ()

Sets an alias to be the equivalent of the path for a client animation track.

Rig version - :SetRigTrackAlias()

TIP

You can use the alias as the last key in the path. Useful for a table of animations. Example:

local AnimationIds = {
	Player = {
		FistsCombat = {
			-- Fists 3 hit combo
			Combo = {
				[1] = 1234567,
				[2] = 1234567,
				[3] = 1234567
			},

			-- Fists heavy attack
			HeavyAttack = 1234567
		},

		SwordCombat = {
			-- Sword 3 hit combo
			Combo = {
				[1] = 1234567,
				[2] = 1234567,
				[3] = 1234567
			},

			-- Sword heavy attack
			HeavyAttack = 1234567
		}
	}
}

return AnimationIds
-- After the client's animation tracks are loaded...

local heavyAttackAlias = "HeavyAttack" -- We want this alias in order to call Animations:PlayTrackFromAlias(heavyAttackAlias) regardless what weapon is equipped

local currentEquippedWeapon

local function updateHeavyAttackAliasPath()
	local alias = heavyAttackAlias
	local path = currentEquippedWeapon .. "Combat"

	Animations:SetTrackAlias(alias, path) -- Running this will search first "path.alias" and then search "path" if it didn't find "path.alias"
end

local function equipNewWeapon(weaponName)
	currentEquippedWeapon = weaponName

	updateHeavyAttackAliasPath()
end

equipNewWeapon("Fists")

Animations:PlayTrackFromAlias(heavyAttackAlias) -- Plays "FistsCombat.HeavyAttack" on the client's character

equipNewWeapon("Sword")

Animations:PlayTrackFromAlias(heavyAttackAlias) -- Plays "SwordCombat.HeavyAttack" on the client's character

RemoveTrackAlias

AnimationsClient:RemoveTrackAlias(aliasany) → ()

Removes the alias for a client animation track.

Rig version - :RemoveRigTrackAlias()

AttachWithMotor6d

AnimationsClient:AttachWithMotor6d(
modelModel | Tool,
motor6dToCloneMotor6D?
) → ()

Attaches the model to the client's character using the motor6dToClone or the first motor6d found as a child of the model in order to animate it.

In either case, the motor6d used must have the following attributes set:

  • "Part0Name" - the name of the Part0 of the motor6d during the animation.
  • "Part1Name" - the name of the Part1 of the motor6d during the animation.

Rig version - :AttachToRigWithMotor6d()

SetRightGripWeldEnabled

AnimationsClient:SetRightGripWeldEnabled(isEnabledboolean) → ()

Enables/disables the RightGrip weld that is automatically added to a character's right hand when a tool is equipped.

Rig version - :SetRigRightGripWeldEnabled()

FindRightGripWeld

AnimationsClient:FindRightGripWeld() → Weld?

Returns the RightGrip weld that is automatically added to a character's right hand when a tool is equipped or nil.

Rig version - :FindRigRightGripWeld()

WaitForRightGripWeld

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
AnimationsClient:WaitForRightGripWeld() → Weld

Yields until the RightGrip weld that is automatically added to a character's right hand when a tool is equipped is found and then returns it.

Rig version - :WaitForRigRightGripWeld()

Show raw api
{
    "functions": [
        {
            "name": "Init",
            "desc": "Initializes `AnimationsClient`.\n\nYields when...\n- ...server has not initialized.\n- ...animations are being pre-loaded with `ContentProvider:PreloadAsync()` (could take a while).\n\n:::caution important\nMust be called once before any other method.\n:::",
            "params": [
                {
                    "name": "initOptions",
                    "desc": "",
                    "lua_type": "initOptions?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 102,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "GetTrackStartSpeed",
            "desc": "If set with [`HasProperties`](/api/AnimationIds#HasProperties), returns the animation track's `StartSpeed`.\n\n*Rig version - `:GetRigTrackStartSpeed()`*",
            "params": [
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 249,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "GetTimeOfMarker",
            "desc": "This method can yield if the\ninitialization process that caches all of the marker\ntimes is still going on when this method is called. If\nafter 3 seconds the initialization process has still not\nfinished, this method will return `nil`.\n\n:::warning\nThis method only works on animations which you give\nthe [`MarkerTimes`](api/AnimationIds#propertiesSettings) property to.\n:::\n\n```lua\nlocal attackAnim = Animations:PlayTrack(\"Attack\")\nlocal timeOfHitStart = Animations:GetTimeOfMarker(attackAnim, \"HitStart\")\n\nprint(\"Time of hit start:\", timeOfHitStart)\n\n-- or\n\nlocal animIdStr = Animations:GetAnimationIdString(\"Player\", \"Attack\")\nlocal timeOfHitStart = Animations:GetTimeOfMarker(animIdStr, \"HitStart\")\n\nprint(\"Time of hit start:\", timeOfHitStart)\n```",
            "params": [
                {
                    "name": "animTrack_or_IdString",
                    "desc": "",
                    "lua_type": "AnimationTrack | string"
                },
                {
                    "name": "markerName",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 282,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "GetAnimationIdString",
            "desc": "Returns the animation id string under `rigType` at `path` in the [`AnimationIds`](/api/AnimationIds) module.\n\n```lua\nlocal animIdStr = Animations:GetAnimationIdString(\"Player\", \"Run\")\nprint(animIdStr) --> \"rbxassetid://89327320\"\n```",
            "params": [
                {
                    "name": "rigType",
                    "desc": "",
                    "lua_type": "rigType"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 296,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "FindFirstRigPlayingTrack",
            "desc": "Returns a playing animation track found in\n`rig.Humanoid.Animator:GetPlayingAnimationTracks()`\nmatching the animation id found at `path` in the\n[`AnimationIds`](/api/AnimationIds) module or `nil`.\n\n:::warning\nFor this to work, `rig` needs to be registered.\n:::\n\n```lua\nlocal isBlocking = Animations:FindFirstRigPlayingTrack(rig, \"Blocking\")\n\nif isBlocking then\n\twarn(\"We can't hit the enemy, they're blocking!\")\nend\n```",
            "params": [
                {
                    "name": "rig",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 321,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "WaitForRigPlayingTrack",
            "desc": "Yields until a playing animation track is found in\n`rig.Humanoid.Animator:GetPlayingAnimationTracks()`\nmatching the animation id found at `path` in the\n[`AnimationIds`](/api/AnimationIds) module then returns it or returns `nil` after\n`timeout` seconds if provided.\n\nEspecially useful if the animation needs time to replicate from server to client and you want to specify a maximum time to wait until it replicates.\n\n:::warning\nFor this to work, `rig` needs to be registered.\n:::\n\n```lua\nlocal isBlocking = Animations:WaitForRigPlayingTrack(rig, \"Blocking\", 1)\n\nif isBlocking then\n\twarn(\"We can't hit the enemy, they're blocking!\")\nend\n```",
            "params": [
                {
                    "name": "rig",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                },
                {
                    "name": "timeout",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack?"
                }
            ],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 350,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "GetAppliedProfileName",
            "desc": "Returns the client's currently applied animation profile name or `nil`.\n\n*Rig version - `:GetRigAppliedProfileName()`*",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 360,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "AwaitPreloadAsyncFinished",
            "desc": "Yields until `ContentProvider:PreloadAsync()` finishes pre-loading all animation instances.\n\n```lua\nlocal loadedAnimInstances = Animations:AwaitPreloadAsyncFinished()\n\t\nprint(\"ContentProvider:PreloadAsync() finished pre-loading all animations:\", loadedAnimInstances)\n```",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{Animation?}"
                }
            ],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 375,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "Register",
            "desc": "Registers the client's character so that methods using animation tracks can be called.\n\n:::note rig version\n`:RegisterRig()`\n:::tip\nAutomatically calls `rig:SetAttribute(\"AnimationsRigType\", rigType)` which is useful for determining rig types.\n:::",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 428,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "AwaitRegistered",
            "desc": "Yields until the client gets registered.\n\n*Rig version - `:AwaitRigRegistered()`*",
            "params": [],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 438,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "IsRegistered",
            "desc": "Returns `true` if the client is registered.\n\n*Rig version - `:IsRigRegistered()`*",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 448,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "ApplyCustomRBXAnimationIds",
            "desc": "Applies the animation ids specified in the [`humanoidRigTypeToCustomRBXAnimationIds`](#humanoidRigTypeToCustomRBXAnimationIds) table on the client's character.\n\nYields when...\n- ...the client's character, humanoid, animator, or animate script aren't immediately available.\n\n```lua\nAnimations:ApplyCustomRBXAnimationIds({\n\t[Enum.HumanoidRigType.R15] = {\n\t\tjump = 656117878,\n\t\tidle = {\n\t\t\tAnimation1 = 656117400,\n\t\t\tAnimation2 = 656118341\n\t\t}\n\t}\n})\n```\n\n:::note rig version\n`:ApplyRigCustomRBXAnimationIds()`\n:::warning\nOnly works for `R6`/`R15` rigs that are local to the client or network-owned by the client and have a client-side `\"Animate\"` script in their model.\n:::",
            "params": [
                {
                    "name": "humanoidRigTypeToCustomRBXAnimationIds",
                    "desc": "",
                    "lua_type": "humanoidRigTypeToCustomRBXAnimationIds"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 478,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "GetAnimationProfile",
            "desc": "Returns the [`humanoidRigTypeToCustomRBXAnimationIds`](#humanoidRigTypeToCustomRBXAnimationIds) table from the animation profile module or `nil`.\n\n:::info\nFor more info, see [animation profiles](/docs/animation-profiles).\n:::",
            "params": [
                {
                    "name": "animationProfileName",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "animationProfile humanoidRigTypeToCustomRBXAnimationIds?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 491,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "ApplyAnimationProfile",
            "desc": "Applies the animation ids found in the animation profile on the client's character.\n\nYields when...\n- ...the client's character, humanoid, animator, or animate script aren't immediately available.\n\n:::info\nFor more info, see [animation profiles](/docs/animation-profiles).\n:::\n\n:::note rig version\n`:ApplyRigAnimationProfile()`\n:::warning\nOnly works for `R6`/`R15` rigs that are local to the client or network-owned by the client and have a client-side `\"Animate\"` script in their model.\n:::",
            "params": [
                {
                    "name": "animationProfileName",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 513,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "AwaitAllTracksLoaded",
            "desc": "Yields until the client has been registered and then until all animation tracks have loaded.\n\n*Rig version - `:AwaitAllRigTracksLoaded()`*",
            "params": [],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 523,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "AwaitTracksLoadedAt",
            "desc": "Yields until the client has been registered and then until all animation tracks have loaded at `path`.\n\n*Rig version - `:AwaitRigTracksLoadedAt()`*",
            "params": [
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 534,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "AreAllTracksLoaded",
            "desc": "Returns `true` if the client has had all its animation tracks loaded.\n\n*Rig version - `:AreAllRigTracksLoaded()`*",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 544,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "AreTracksLoadedAt",
            "desc": "Returns `true` if the client has had its animation tracks loaded at `path`.\n\n*Rig version - `:AreRigTracksLoadedAt()`*",
            "params": [
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 555,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "LoadAllTracks",
            "desc": "Creates animation tracks from all animation ids in [`AnimationIds`](/api/AnimationIds) for the client.\n\nYields when...\n- ...client's animator is not a descendant of `game`.\n\n*Rig version - `:LoadAllRigTracks()`*",
            "params": [],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 568,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "LoadTracksAt",
            "desc": "Creates animation tracks from all animation ids in [`AnimationIds`](/api/AnimationIds) for the client at `path`.\n\nYields when...\n- ...client's animator is not a descendant of `game`.\n\n*Rig version - `:LoadRigTracksAt()`*",
            "params": [
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 582,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "GetTrack",
            "desc": "Returns a client animation track or `nil`.\n\n*Rig version - `:GetRigTrack()`*",
            "params": [
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 593,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "PlayTrack",
            "desc": "Returns a playing client animation track.\n\n:::note rig version\n`:PlayRigTrack()`\n\n```lua\nAnimations:RegisterRig(rig, \"Monster\") -- In order to use \"Monster\" animations (in AnimationIds) on this rig\n\nAnimations:LoadAllRigTracks(rig)\nAnimations:PlayRigTrack(rig, \"Run\")\n```\n:::",
            "params": [
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "weight",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "speed",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 616,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "StopTrack",
            "desc": "Returns a stopped client animation track.\n\n*Rig version - `:StopRigTrack()`*",
            "params": [
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 628,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "StopPlayingTracks",
            "desc": "Returns the stopped client animation tracks.\n\n*Rig version - `:StopRigPlayingTracks()`*",
            "params": [
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{AnimationTrack?}"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 639,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "GetPlayingTracks",
            "desc": "Returns the playing client animation tracks.\n\n*Rig version - `:GetRigPlayingTracks()`*",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{AnimationTrack?}"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 649,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "StopTracksOfPriority",
            "desc": "Returns the stopped client animation tracks.\n\n*Rig version - `:StopRigTracksOfPriority()`*",
            "params": [
                {
                    "name": "animationPriority",
                    "desc": "",
                    "lua_type": "Enum.AnimationPriority"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{AnimationTrack?}"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 661,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "GetTrackFromAlias",
            "desc": "Returns a client animation track or `nil`.\n\n*Rig version - `:GetRigTrackFromAlias()`*",
            "params": [
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 672,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "PlayTrackFromAlias",
            "desc": "Returns a playing client animation track.\n\n*Rig version - `:PlayRigTrackFromAlias()`*",
            "params": [
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "weight",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "speed",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 686,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "StopTrackFromAlias",
            "desc": "Returns a stopped client animation track.\n\n*Rig version - `:StopRigTrackFromAlias()`*",
            "params": [
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 698,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "SetTrackAlias",
            "desc": "Sets an alias to be the equivalent of the path for a client animation track.\n\n*Rig version - `:SetRigTrackAlias()`*\n\n:::tip\nYou can use the alias as the last key in the path. Useful for a table of animations. Example:\n\n```lua\nlocal AnimationIds = {\n\tPlayer = {\n\t\tFistsCombat = {\n\t\t\t-- Fists 3 hit combo\n\t\t\tCombo = {\n\t\t\t\t[1] = 1234567,\n\t\t\t\t[2] = 1234567,\n\t\t\t\t[3] = 1234567\n\t\t\t},\n\n\t\t\t-- Fists heavy attack\n\t\t\tHeavyAttack = 1234567\n\t\t},\n\n\t\tSwordCombat = {\n\t\t\t-- Sword 3 hit combo\n\t\t\tCombo = {\n\t\t\t\t[1] = 1234567,\n\t\t\t\t[2] = 1234567,\n\t\t\t\t[3] = 1234567\n\t\t\t},\n\n\t\t\t-- Sword heavy attack\n\t\t\tHeavyAttack = 1234567\n\t\t}\n\t}\n}\n\nreturn AnimationIds\n```\n\n```lua\n-- After the client's animation tracks are loaded...\n\nlocal heavyAttackAlias = \"HeavyAttack\" -- We want this alias in order to call Animations:PlayTrackFromAlias(heavyAttackAlias) regardless what weapon is equipped\n\nlocal currentEquippedWeapon\n\nlocal function updateHeavyAttackAliasPath()\n\tlocal alias = heavyAttackAlias\n\tlocal path = currentEquippedWeapon .. \"Combat\"\n\n\tAnimations:SetTrackAlias(alias, path) -- Running this will search first \"path.alias\" and then search \"path\" if it didn't find \"path.alias\"\nend\n\nlocal function equipNewWeapon(weaponName)\n\tcurrentEquippedWeapon = weaponName\n\n\tupdateHeavyAttackAliasPath()\nend\n\nequipNewWeapon(\"Fists\")\n\nAnimations:PlayTrackFromAlias(heavyAttackAlias) -- Plays \"FistsCombat.HeavyAttack\" on the client's character\n\nequipNewWeapon(\"Sword\")\n\nAnimations:PlayTrackFromAlias(heavyAttackAlias) -- Plays \"SwordCombat.HeavyAttack\" on the client's character\n```\n:::",
            "params": [
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 774,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "RemoveTrackAlias",
            "desc": "Removes the alias for a client animation track.\n\n*Rig version - `:RemoveRigTrackAlias()`*",
            "params": [
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 784,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "AttachWithMotor6d",
            "desc": "Attaches the `model` to the client's character using the `motor6dToClone` or the first `motor6d` found as a child of the `model` in order to animate it.\n\nIn either case, the `motor6d` used must have the following attributes set:\n- `\"Part0Name\"` - the name of the `Part0` of the `motor6d` during the animation.\n- `\"Part1Name\"` - the name of the `Part1` of the `motor6d` during the animation.\n\n*Rig version - `:AttachToRigWithMotor6d()`*",
            "params": [
                {
                    "name": "model",
                    "desc": "",
                    "lua_type": "Model | Tool"
                },
                {
                    "name": "motor6dToClone",
                    "desc": "",
                    "lua_type": "Motor6D?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 799,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "SetRightGripWeldEnabled",
            "desc": "Enables/disables the `RightGrip` weld that is automatically added to a character's right hand when a tool is equipped.\n\n*Rig version - `:SetRigRightGripWeldEnabled()`*",
            "params": [
                {
                    "name": "isEnabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 809,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "FindRightGripWeld",
            "desc": "Returns the `RightGrip` weld that is automatically added to a character's right hand when a tool is equipped or `nil`.\n\n*Rig version - `:FindRigRightGripWeld()`*",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Weld?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 819,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "WaitForRightGripWeld",
            "desc": "Yields until the `RightGrip` weld that is automatically added to a character's right hand when a tool is equipped is found and then returns it.\n\n*Rig version - `:WaitForRigRightGripWeld()`*",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Weld"
                }
            ],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 830,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "AutoLoadAllPlayerTracks",
            "desc": "If set to true, client animation tracks will be loaded each time the client spawns.",
            "lua_type": "false",
            "source": {
                "line": 62,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "AutoRegisterPlayer",
            "desc": "If set to true, the client will be auto registered with [`rigType`](/api/AnimationIds#rigType) of `\"Player\"` each time they spawn.",
            "lua_type": "true",
            "source": {
                "line": 70,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "BootstrapDepsFolder",
            "desc": "Set this to the dependencies folder if you have moved it from its original location inside of the root `Animations` folder.",
            "lua_type": "Folder?",
            "source": {
                "line": 78,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "TimeToLoadPrints",
            "desc": "If set to true, makes helpful prints about the time it takes to pre-load and load animations.",
            "lua_type": "true",
            "source": {
                "line": 86,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "PreloadAsyncProgressed",
            "desc": "Fires when `ContentProvider:PreloadAsync()` finishes pre-loading one animation instance.\n\n```lua\nAnimations.PreloadAsyncProgressed:Connect(function(n, total, loadedAnimInstance)\n\tprint(\"ContentProvider:PreloadAsync() finished pre-loading one animation:\", n, total, loadedAnimInstance)\nend)\n```",
            "lua_type": "RBXScriptSignal",
            "source": {
                "line": 387,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        }
    ],
    "types": [
        {
            "name": "initOptions",
            "desc": "For more info, see [`Properties`](/api/AnimationsClient/#properties).",
            "fields": [
                {
                    "name": "AutoLoadAllPlayerTracks",
                    "lua_type": "false",
                    "desc": ""
                },
                {
                    "name": "AutoRegisterPlayer",
                    "lua_type": "true",
                    "desc": ""
                },
                {
                    "name": "BootstrapDepsFolder",
                    "lua_type": "Folder?",
                    "desc": ""
                },
                {
                    "name": "TimeToLoadPrints",
                    "lua_type": "true",
                    "desc": ""
                }
            ],
            "source": {
                "line": 26,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "path",
            "desc": "These are all valid forms of paths to animation tracks you have defined in the [`AnimationIds`](/api/AnimationIds) module:\n\n```lua\nlocal path = \"Jump\" -- A single key (any type)\n\nlocal path = {\"Dodge\", Vector3.xAxis} -- An array path (values of any type)\n\nlocal path = \"Climb.Right\" -- A string path separated by \".\"\n\nAnimations:PlayTrack(path)\n```",
            "lua_type": "{any} | string",
            "source": {
                "line": 44,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "customRBXAnimationIds",
            "desc": "A table of animation ids to replace the default roblox animation ids.\n\n:::note\nThe `\"walk\"` animation is used for both walking and running on `R6` characters.\n:::",
            "fields": [
                {
                    "name": "run",
                    "lua_type": "number?",
                    "desc": ""
                },
                {
                    "name": "walk",
                    "lua_type": "number?",
                    "desc": ""
                },
                {
                    "name": "jump",
                    "lua_type": "number?",
                    "desc": ""
                },
                {
                    "name": "idle",
                    "lua_type": "{Animation1: number?, Animation2: number?}?",
                    "desc": ""
                },
                {
                    "name": "fall",
                    "lua_type": "number?",
                    "desc": ""
                },
                {
                    "name": "swim",
                    "lua_type": "number?",
                    "desc": ""
                },
                {
                    "name": "swimIdle",
                    "lua_type": "number?",
                    "desc": ""
                },
                {
                    "name": "climb",
                    "lua_type": "number?",
                    "desc": ""
                }
            ],
            "source": {
                "line": 406,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        },
        {
            "name": "humanoidRigTypeToCustomRBXAnimationIds",
            "desc": "A table mapping a `Enum.HumanoidRigType` to its supported animation ids that will replace the default roblox animation ids.",
            "fields": [
                {
                    "name": "[Enum.HumanoidRigType.R6]",
                    "lua_type": "customRBXAnimationIds?",
                    "desc": ""
                },
                {
                    "name": "[Enum.HumanoidRigType.R15]",
                    "lua_type": "customRBXAnimationIds?",
                    "desc": ""
                }
            ],
            "source": {
                "line": 415,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
            }
        }
    ],
    "name": "AnimationsClient",
    "desc": ":::note\nRoblox model path: `Animations\\Package\\AnimationsClient`\n:::",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 54,
        "path": "src/ReplicatedStorage/Animations/Package/AnimationsClient.lua"
    }
}