Skip to main content

AnimationsServer

This item only works when running on the server. Server
NOTE

Roblox model path: Animations\Package\AnimationsServer

Types

initOptions

interface initOptions {
AutoLoadAllPlayerTracksfalse
AutoRegisterPlayerstrue
BootstrapDepsFolderFolder?
TimeToLoadPrintsfalse
}

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(player, 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

AnimationsServer.AutoLoadAllPlayerTracks: false

If set to true, all player animation tracks will be loaded for each player character on spawn.

AutoRegisterPlayers

AnimationsServer.AutoRegisterPlayers: true

If set to true, all player characters will be auto registered with rigType of "Player" when they spawn.

BootstrapDepsFolder

AnimationsServer.BootstrapDepsFolder: Folder?

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

TimeToLoadPrints

AnimationsServer.TimeToLoadPrints: true

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

PreloadAsyncProgressed

AnimationsServer.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
AnimationsServer:Init(initOptionsinitOptions?) → ()

Initializes AnimationsServer. Clients are unable to initialize until this gets called.

Yields when...

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

Must be called once before any other method.

GetTrackStartSpeed

AnimationsServer:GetTrackStartSpeed(
player_or_rigPlayer | Model,
pathpath
) → number?

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

GetTimeOfMarker

AnimationsServer: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

AnimationsServer: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

AnimationsServer: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
AnimationsServer: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.

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

AnimationsServer:GetAppliedProfileName(player_or_rigPlayer | Model) → string?

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

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
AnimationsServer: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

AnimationsServer:Register(
player_or_rigPlayer | Model,
rigTypestring
) → ()

Registers the player_or_rig so that methods using animation tracks can be called.

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
AnimationsServer:AwaitRegistered(player_or_rigPlayer | Model) → ()

Yields until the player_or_rig gets registered.

IsRegistered

AnimationsServer:IsRegistered(player_or_rigPlayer | Model) → boolean

Returns true if the player_or_rig is registered.

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
AnimationsServer:ApplyCustomRBXAnimationIds(
player_or_rigPlayer | Model,
humanoidRigTypeToCustomRBXAnimationIdshumanoidRigTypeToCustomRBXAnimationIds
) → ()

Applies the animation ids specified in the humanoidRigTypeToCustomRBXAnimationIds table on the player_or_rig.

Yields when...

  • ...the player's character, player or rig's humanoid, player's animator, or player or rig's animate script aren't immediately available.
WARNING

This function only works for players and R6/R15 NPCs that have an "Animate" script in their model.

Animations:ApplyCustomRBXAnimationIds(player, {
	[Enum.HumanoidRigType.R15] = {
		jump = 656117878,
		idle = {
			Animation1 = 656117400,
			Animation2 = 656118341
		}
	}
})

GetAnimationProfile

AnimationsServer: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
AnimationsServer:ApplyAnimationProfile(
player_or_rigPlayer | Model,
animationProfileNamestring
) → ()

Applies the animation ids found in the animation profile on the player_or_rig.

Yields when...

  • ...the player's character, player or rig's humanoid, player's animator, or player or rig's animate script aren't immediately available.
WARNING

This function only works for players and R6/R15 NPCs that have an "Animate" script in their model.

INFO

For more info, see animation profiles.

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
AnimationsServer:AwaitAllTracksLoaded(player_or_rigPlayer | Model) → ()

Yields until all the player_or_rig's animation tracks have loaded.

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
AnimationsServer:AwaitTracksLoadedAt(
player_or_rigPlayer | Model,
pathpath
) → ()

Yields until the player_or_rig's animation tracks have loaded at path.

AreAllTracksLoaded

AnimationsServer:AreAllTracksLoaded(player_or_rigPlayer | Model) → boolean

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

AreTracksLoadedAt

AnimationsServer:AreTracksLoadedAt(
player_or_rigPlayer | Model,
pathpath
) → boolean

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

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
AnimationsServer:LoadAllTracks(player_or_rigPlayer | Model) → ()

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

Yields when...

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

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
AnimationsServer:LoadTracksAt(
player_or_rigPlayer | Model,
pathpath
) → ()

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

Yields when...

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

GetTrack

AnimationsServer:GetTrack(
player_or_rigPlayer | Model,
pathpath
) → AnimationTrack?

Returns a player_or_rig's animation track or nil.

PlayTrack

AnimationsServer:PlayTrack(
player_or_rigPlayer | Model,
pathpath,
fadeTimenumber?,
weightnumber?,
speednumber?
) → AnimationTrack

Returns a playing player_or_rig's animation track.

StopTrack

AnimationsServer:StopTrack(
player_or_rigPlayer | Model,
pathpath,
fadeTimenumber?
) → AnimationTrack

Returns a stopped player_or_rig's animation track.

StopPlayingTracks

AnimationsServer:StopPlayingTracks(
player_or_rigPlayer | Model,
fadeTimenumber?
) → {AnimationTrack?}

Returns the stopped player_or_rig animation tracks.

GetPlayingTracks

AnimationsServer:GetPlayingTracks(player_or_rigPlayer | Model) → {AnimationTrack?}

Returns playing player_or_rig animation tracks.

StopTracksOfPriority

AnimationsServer:StopTracksOfPriority(
player_or_rigPlayer | Model,
animationPriorityEnum.AnimationPriority,
fadeTimenumber?
) → {AnimationTrack?}

Returns the stopped player_or_rig animation tracks.

GetTrackFromAlias

AnimationsServer:GetTrackFromAlias(
player_or_rigPlayer | Model,
aliasany
) → AnimationTrack?

Returns a player_or_rig's animation track or nil.

PlayTrackFromAlias

AnimationsServer:PlayTrackFromAlias(
player_or_rigPlayer | Model,
aliasany,
fadeTimenumber?,
weightnumber?,
speednumber?
) → AnimationTrack

Returns a playing player_or_rig's animation track.

StopTrackFromAlias

AnimationsServer:StopTrackFromAlias(
player_or_rigPlayer | Model,
aliasany,
fadeTimenumber?
) → AnimationTrack

Returns a stopped player_or_rig's animation track.

SetTrackAlias

AnimationsServer:SetTrackAlias(
player_or_rigPlayer | Model,
aliasany,
pathpath
) → ()

Sets an alias to be the equivalent of the path for a player_or_rig's animation track.

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
local player = game.Players.wrello

-- After the player's animation tracks are loaded...

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

local currentEquippedWeapon

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

	Animations:SetTrackAlias(player, 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(player, heavyAttackAlias) -- Plays "FistsCombat.HeavyAttack" on the player's character

equipNewWeapon("Sword")

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

RemoveTrackAlias

AnimationsServer:RemoveTrackAlias(
player_or_rigPlayer | Model,
aliasany
) → ()

Removes the alias for a player_or_rig's animation track.

AttachWithMotor6d

AnimationsServer:AttachWithMotor6d(
player_or_rigPlayer | Model,
modelModel | Tool,
motor6dToCloneMotor6D?
) → ()

Attaches the model to the player_or_rig 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.

SetRightGripWeldEnabled

AnimationsServer:SetRightGripWeldEnabled(
player_or_rigPlayer | Model,
isEnabledboolean
) → ()

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

FindRightGripWeld

AnimationsServer:FindRightGripWeld(player_or_rigPlayer | Model) → Weld?

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

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
AnimationsServer:WaitForRightGripWeld(player_or_rigPlayer | Model) → 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.

Show raw api
{
    "functions": [
        {
            "name": "Init",
            "desc": "Initializes `AnimationsServer`. Clients are unable to initialize until this gets called.\n\nYields when...\n- ...animations are being pre-loaded with `ContentProvider:PreloadAsync()` (could take a while).\n\n:::warning 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": 99,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "GetTrackStartSpeed",
            "desc": "If set with [`HasProperties`](/api/AnimationIds#HasProperties), returns the animation track's `StartSpeed`.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 177,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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": 210,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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": 224,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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": 249,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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\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": 276,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "GetAppliedProfileName",
            "desc": "Returns the `player_or_rig`'s currently applied animation profile name or `nil`.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 285,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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": 300,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "Register",
            "desc": "Registers the `player_or_rig` so that methods using animation tracks can be called.\n\n:::tip\nAutomatically calls `rig:SetAttribute(\"AnimationsRigType\", rigType)` which is useful for determining rig types.\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "rigType",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 353,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AwaitRegistered",
            "desc": "Yields until the `player_or_rig` gets registered.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 362,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "IsRegistered",
            "desc": "Returns `true` if the `player_or_rig` is registered.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 371,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "ApplyCustomRBXAnimationIds",
            "desc": "Applies the animation ids specified in the [`humanoidRigTypeToCustomRBXAnimationIds`](#humanoidRigTypeToCustomRBXAnimationIds) table on the `player_or_rig`.\n\nYields when...\n- ...the player's character, player or rig's humanoid, player's animator, or player or rig's animate script aren't immediately available.\n\n:::warning\nThis function only works for players and `R6`/`R15` NPCs that have an `\"Animate\"` script in their model.\n:::\n\n```lua\nAnimations:ApplyCustomRBXAnimationIds(player, {\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```",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "humanoidRigTypeToCustomRBXAnimationIds",
                    "desc": "",
                    "lua_type": "humanoidRigTypeToCustomRBXAnimationIds"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 400,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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": 413,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "ApplyAnimationProfile",
            "desc": "Applies the animation ids found in the animation profile on the `player_or_rig`.\n\nYields when...\n- ...the player's character, player or rig's humanoid, player's animator, or player or rig's animate script aren't immediately available.\n\n:::warning\nThis function only works for players and `R6`/`R15` NPCs that have an `\"Animate\"` script in their model.\n:::\n:::info\nFor more info, see [animation profiles](/docs/animation-profiles).\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "animationProfileName",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 432,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AwaitAllTracksLoaded",
            "desc": "Yields until all the `player_or_rig`'s animation tracks have loaded.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 441,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AwaitTracksLoadedAt",
            "desc": "Yields until the `player_or_rig`'s animation tracks have loaded at `path`.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 450,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AreAllTracksLoaded",
            "desc": "Returns `true` if the `player_or_rig` has had all its animation tracks loaded.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 459,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AreTracksLoadedAt",
            "desc": "Returns `true` if the `player_or_rig` has had its animation tracks loaded at `path`.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 468,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "LoadAllTracks",
            "desc": "Creates animation tracks from all animation ids in [`AnimationIds`](/api/AnimationIds) for the `player_or_rig`.\n\nYields when...\n- ...`player_or_rig`'s animator is not a descendant of `game`.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 480,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "LoadTracksAt",
            "desc": "Creates animation tracks from animation ids in [`AnimationIds`](/api/AnimationIds) for the `player_or_rig` at `path`.\n\nYields when...\n- ...`player_or_rig`'s animator is not a descendant of `game`.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 492,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "GetTrack",
            "desc": "Returns a `player_or_rig`'s animation track or `nil`.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 502,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "PlayTrack",
            "desc": "Returns a playing `player_or_rig`'s animation track.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "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": 515,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "StopTrack",
            "desc": "Returns a stopped `player_or_rig`'s animation track.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 526,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "StopPlayingTracks",
            "desc": "Returns the stopped `player_or_rig` animation tracks.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{AnimationTrack?}"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 536,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "GetPlayingTracks",
            "desc": "Returns playing `player_or_rig` animation tracks.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{AnimationTrack?}"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 545,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "StopTracksOfPriority",
            "desc": "Returns the stopped `player_or_rig` animation tracks.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "animationPriority",
                    "desc": "",
                    "lua_type": "Enum.AnimationPriority"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{AnimationTrack?}"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 556,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "GetTrackFromAlias",
            "desc": "Returns a `player_or_rig`'s animation track or `nil`.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 566,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "PlayTrackFromAlias",
            "desc": "Returns a playing `player_or_rig`'s animation track.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "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": 579,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "StopTrackFromAlias",
            "desc": "Returns a stopped `player_or_rig`'s animation track.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 590,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "SetTrackAlias",
            "desc": "Sets an alias to be the equivalent of the path for a `player_or_rig`'s animation track.\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\nlocal player = game.Players.wrello\n\n-- After the player's animation tracks are loaded...\n\nlocal heavyAttackAlias = \"HeavyAttack\" -- We want this alias in order to call Animations:PlayTrackFromAlias(player, 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(player, 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(player, heavyAttackAlias) -- Plays \"FistsCombat.HeavyAttack\" on the player's character\n\nequipNewWeapon(\"Sword\")\n\nAnimations:PlayTrackFromAlias(player, heavyAttackAlias) -- Plays \"SwordCombat.HeavyAttack\" on the player's character\n```\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 667,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "RemoveTrackAlias",
            "desc": "Removes the alias for a `player_or_rig`'s animation track.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 676,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AttachWithMotor6d",
            "desc": "Attaches the `model` to the `player_or_rig` 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.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "model",
                    "desc": "",
                    "lua_type": "Model | Tool"
                },
                {
                    "name": "motor6dToClone",
                    "desc": "",
                    "lua_type": "Motor6D?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 690,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "SetRightGripWeldEnabled",
            "desc": "Enables/disables the `RightGrip` weld that is automatically added to a character's right hand when a tool is equipped.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "isEnabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 699,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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`.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Weld?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 708,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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.",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Weld"
                }
            ],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 718,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "AutoLoadAllPlayerTracks",
            "desc": "If set to true, all player animation tracks will be loaded for each player character on spawn.",
            "lua_type": "false",
            "source": {
                "line": 60,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AutoRegisterPlayers",
            "desc": "If set to true, all player characters will be auto registered with [`rigType`](/api/AnimationIds#rigType) of `\"Player\"` when they spawn.",
            "lua_type": "true",
            "source": {
                "line": 68,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "BootstrapDepsFolder",
            "desc": "Set to the dependencies folder if you have moved it from its original location inside of the root `Animations` folder.",
            "lua_type": "Folder?",
            "source": {
                "line": 76,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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": 84,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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": 312,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        }
    ],
    "types": [
        {
            "name": "initOptions",
            "desc": "For more info, see [`Properties`](/api/AnimationsServer/#properties).",
            "fields": [
                {
                    "name": "AutoLoadAllPlayerTracks",
                    "lua_type": "false",
                    "desc": ""
                },
                {
                    "name": "AutoRegisterPlayers",
                    "lua_type": "true",
                    "desc": ""
                },
                {
                    "name": "BootstrapDepsFolder",
                    "lua_type": "Folder?",
                    "desc": ""
                },
                {
                    "name": "TimeToLoadPrints",
                    "lua_type": "false",
                    "desc": ""
                }
            ],
            "source": {
                "line": 23,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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(player, path)\n```",
            "lua_type": "{any} | string",
            "source": {
                "line": 41,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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": 331,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.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": 340,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        }
    ],
    "name": "AnimationsServer",
    "desc": ":::note\nRoblox model path: `Animations\\Package\\AnimationsServer`\n:::",
    "realm": [
        "Server"
    ],
    "source": {
        "line": 52,
        "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
    }
}