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
TimeToLoadPrintsfalse
EnableAutoCustomRBXAnimationIdsfalse
AnimatedObjectsDebugModefalse
}

Gets applied to Properties.

path

type path = {any} | string
-- In a ServerScript
local Animations = require(game.ReplicatedStorage.Animations.Package.AnimationsServer)


-- These are all valid options for retrieving an animation track
local animationPath = "Jump" -- A single key (any type)

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

local animationPath = "Climb.Right" -- A path seperated by "." (string)


local animationTrack = Animations:GetTrack(player, animationPath)

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.

info

Roblox applies the "walk" animation id for R6 characters and the "run" animation id for R15 characters (instead of both).

humanoidRigTypeToCustomRBXAnimationIds

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

A table mapping a humanoid rig type to its supported animation ids that will replace the default roblox animation ids.

Properties

DepsFolderPath

AnimationsServer.DepsFolderPath: nil

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

added in version 2.0.0-rc1

AutoRegisterPlayers

AnimationsServer.AutoRegisterPlayers: true

If set to true, player characters will automatically be registered on spawn. See Animations:Register() for more info.

warning

Must have animation ids under rigType of "Player" in the AnimationIds module.

added in version 2.0.0-rc1

AutoLoadAllPlayerTracks

AnimationsServer.AutoLoadAllPlayerTracks: false

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

warning

Must have animation ids under rigType of "Player" in the AnimationIds module.

changed in version 2.0.0-rc1

Renamed: AutoLoadPlayerTracks -> AutoLoadAllPlayerTracks

Will automatically register players as well if AutoRegisterPlayers is not already set to true.

TimeToLoadPrints

AnimationsServer.TimeToLoadPrints: true

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

changed in version 2.0.0-rc1

Defaults to true.

EnableAutoCustomRBXAnimationIds

AnimationsServer.EnableAutoCustomRBXAnimationIds: false

If set to true, applies the AutoCustomRBXAnimationIds module table to each player character on spawn.

AnimatedObjectsDebugMode

AnimationsServer.AnimatedObjectsDebugMode: false

If set to true, prints will be made to help debug attaching and detaching animated objects.

PreloadAsyncProgressed

AnimationsServer.PreloadAsyncProgressed: RBXScriptSignal

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

-- In a ServerScript
Animations.PreloadAsyncProgressed:Connect(function(n, total, loadedAnimInstance)
	print("ContentProvider:PreloadAsync() finished pre-loading one:", n, total, loadedAnimInstance)
end)
added in version 2.0.0-rc1

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).
info

Should be called once before any other method.

GetAppliedProfileName

AnimationsServer:GetAppliedProfileName(player_or_rigPlayer | Model) → string?

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

added in version 2.0.0

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.

-- In a ServerScript
local loadedAnimInstances = Animations:AwaitPreloadAsyncFinished()
	
print("ContentProvider:PreloadAsync() finished pre-loading all:", loadedAnimInstances)
added in version 2.0.0-rc1

Register

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

Registers the player's character/rig so that methods using animation tracks can be called.

tip

Automatically gives the character/rig an attribute "AnimationsRigType" set to the rigType.

added in version 2.0.0-rc1

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.

added in version 2.0.0-rc1

IsRegistered

AnimationsServer:IsRegistered(player_or_rigPlayer | Model) → boolean

Returns if the player_or_rig is registered.

added in version 2.0.0-rc1

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.

tip

See ApplyAnimationProfile() for a more convenient way of overriding default roblox character animations.

-- In a ServerScript
local Animations = require(game.ReplicatedStorage.Animations.Package.AnimationsServer)

Animations:Init()

task.wait(5)

print("Applying r15 ninja jump & idle animations")

-- These animations will only work if your character is R15
Animations:ApplyCustomRBXAnimationIds(game.Players.YourName, {
	[Enum.HumanoidRigType.R15] = {
		jump = 656117878,
		idle = {
			Animation1 = 656117400,
			Animation2 = 656118341
		}	
	}
})

GetAnimationProfile

AnimationsServer:GetAnimationProfile(animationProfileNamestring) → animationProfilehumanoidRigTypeToCustomRBXAnimationIds?

Returns the humanoidRigTypeToCustomRBXAnimationIds table found in the profile module Deps.<animationProfileName>, or not if it doesn't exist.

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 information on setting up animated objects check out animation profiles tutorial.

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.

changed in version 2.0.0-rc1

Renamed: AwaitLoaded -> AwaitAllTracksLoaded

-- In a ServerScript
-- [WARNING] For this to work you need animation ids under the rig type of "Player" in the 'AnimationIds' module
local Animations = require(game.ReplicatedStorage.Animations.Package.AnimationsServer)

Animations:Init({
	AutoRegisterPlayers = true, -- Defaults to false (on the server)
	AutoLoadAllPlayerTracks = true -- Defaults to false
})

local player = game.Players:WaitForChild("MyName")

Animations:AwaitAllTracksLoaded(player)

print("Animation tracks finished loading on the server!")

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.

added in version 2.0.0-rc1

AreAllTracksLoaded

AnimationsServer:AreAllTracksLoaded(player_or_rigPlayer | Model) → boolean

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

changed in version 2.0.0-rc1

Renamed: AreTracksLoaded -> AreAllTracksLoaded

AreTracksLoadedAt

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

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

added in version 2.0.0-rc1

LoadAllTracks

AnimationsServer:LoadAllTracks(player_or_rigPlayer | Model) → ()

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

changed in version 2.0.0-rc1

Renamed: LoadTracks -> LoadAllTracks

Now requires Animations:Register() before usage unless player_or_rig is a player and Animations.AutoRegisterPlayers is enabled.

LoadTracksAt

AnimationsServer:LoadTracksAt(
player_or_rigPlayer | Model,
pathpath
) → ()

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

added in version 2.0.0-rc1

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.

changed in version 2.0.0-rc1

Renamed: StopAllTracks -> StopPlayingTracks

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:

-- In ReplicatedStorage.Animations.Deps.AnimationIds
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
		}
	}
}
-- In a ServerScript
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.

AttachAnimatedObject

Beta
AnimationsServer:AttachAnimatedObject(
player_or_rigPlayer | Model,
animatedObjectPathpath
) → ()

Attaches the animated object to the player_or_rig.

tip

Enable initOptions.AnimatedObjectsDebugMode for detailed prints about animated objects.

info

For more information on setting up animated objects check out animated objects tutorial.

DetachAnimatedObject

Beta
AnimationsServer:DetachAnimatedObject(
player_or_rigPlayer | Model,
animatedObjectPathpath
) → ()

Detaches the animated object from the player_or_rig.

tip

Enable initOptions.AnimatedObjectsDebugMode for detailed prints about animated objects.

info

For more information on setting up animated objects check out animated objects tutorial.

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:::info\nShould be called once before any other method.\n:::",
            "params": [
                {
                    "name": "initOptions",
                    "desc": "",
                    "lua_type": "initOptions?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 147,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "GetAppliedProfileName",
            "desc": "Returns the `player_or_rig`'s currently applied animation profile name or nil.\n\n:::tip *added in version 2.0.0*\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 236,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AwaitPreloadAsyncFinished",
            "desc": "Yields until `ContentProvider:PreloadAsync()` finishes pre-loading all animation instances.\n\n```lua\n-- In a ServerScript\nlocal loadedAnimInstances = Animations:AwaitPreloadAsyncFinished()\n\t\nprint(\"ContentProvider:PreloadAsync() finished pre-loading all:\", loadedAnimInstances)\n```\n\n:::tip *added in version 2.0.0-rc1*\n:::",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{Animation?}"
                }
            ],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 255,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "Register",
            "desc": "Registers the player's character/rig so that methods using animation tracks can be called.\n\n:::tip\nAutomatically gives the character/rig an attribute `\"AnimationsRigType\"` set to the [`rigType`](/api/AnimationIds#rigType).\n:::\n\n:::tip *added in version 2.0.0-rc1*\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "rigType",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 315,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AwaitRegistered",
            "desc": "Yields until the `player_or_rig` gets registered.\n\n:::tip *added in version 2.0.0-rc1*\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 327,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "IsRegistered",
            "desc": "Returns if the `player_or_rig` is registered.\n\n:::tip *added in version 2.0.0-rc1*\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 339,
                "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:::tip\nSee [`ApplyAnimationProfile()`](#ApplyAnimationProfile) for a more convenient way of overriding default roblox character animations.\n:::\n\n```lua\n-- In a ServerScript\nlocal Animations = require(game.ReplicatedStorage.Animations.Package.AnimationsServer)\n\nAnimations:Init()\n\ntask.wait(5)\n\nprint(\"Applying r15 ninja jump & idle animations\")\n\n-- These animations will only work if your character is R15\nAnimations:ApplyCustomRBXAnimationIds(game.Players.YourName, {\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}\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": 381,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "GetAnimationProfile",
            "desc": "Returns the [`humanoidRigTypeToCustomRBXAnimationIds`](api/AnimationsServer#humanoidRigTypeToCustomRBXAnimationIds) table found in the profile module `Deps.<animationProfileName>`, or not if it doesn't exist.",
            "params": [
                {
                    "name": "animationProfileName",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "animationProfile humanoidRigTypeToCustomRBXAnimationIds?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 390,
                "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 information on setting up animated objects check out [animation profiles tutorial](/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": 409,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AwaitAllTracksLoaded",
            "desc": "Yields until all the `player_or_rig`'s animation tracks have loaded.\n\n:::caution *changed in version 2.0.0-rc1*\nRenamed: ~~`AwaitLoaded`~~ -> `AwaitAllTracksLoaded`\n:::\n\n```lua\n-- In a ServerScript\n-- [WARNING] For this to work you need animation ids under the rig type of \"Player\" in the 'AnimationIds' module\nlocal Animations = require(game.ReplicatedStorage.Animations.Package.AnimationsServer)\n\nAnimations:Init({\n\tAutoRegisterPlayers = true, -- Defaults to false (on the server)\n\tAutoLoadAllPlayerTracks = true -- Defaults to false\n})\n\nlocal player = game.Players:WaitForChild(\"MyName\")\n\nAnimations:AwaitAllTracksLoaded(player)\n\nprint(\"Animation tracks finished loading on the server!\")\n```",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 439,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AwaitTracksLoadedAt",
            "desc": "Yields until the `player_or_rig`'s animation tracks have loaded at `path`.\n\n:::tip *added in version 2.0.0-rc1*\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 451,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AreAllTracksLoaded",
            "desc": "Returns if the `player_or_rig` has had all its animation tracks loaded.\n\n:::caution *changed in version 2.0.0-rc1*\nRenamed: ~~`AreTracksLoaded`~~ -> `AreAllTracksLoaded`\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 464,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AreTracksLoadedAt",
            "desc": "Returns if the `player_or_rig` has had its animation tracks loaded at `path`.\n\n:::tip *added in version 2.0.0-rc1*\n:::",
            "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": 476,
                "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\n:::caution *changed in version 2.0.0-rc1*\nRenamed: ~~`LoadTracks`~~ -> `LoadAllTracks`\n\nNow requires `Animations:Register()` before usage unless `player_or_rig` is a player and [`Animations.AutoRegisterPlayers`](/api/AnimationsServer/#AutoRegisterPlayers) is enabled.\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 490,
                "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\n:::tip *added in version 2.0.0-rc1*\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 501,
                "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": 511,
                "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": 524,
                "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": 535,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "StopPlayingTracks",
            "desc": "Returns the stopped `player_or_rig` animation tracks.\n\n:::caution *changed in version 2.0.0-rc1*\nRenamed: ~~`StopAllTracks`~~ -> `StopPlayingTracks`\n:::",
            "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": 549,
                "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": 558,
                "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": 569,
                "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": 579,
                "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": 592,
                "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": 603,
                "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\n-- In ReplicatedStorage.Animations.Deps.AnimationIds\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```\n\n```lua\n-- In a ServerScript\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": 680,
                "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": 689,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AttachAnimatedObject",
            "desc": "Attaches the animated object to the `player_or_rig`.\n\n:::tip\nEnable [`initOptions.AnimatedObjectsDebugMode`](/api/AnimationsServer/#initOptions) for detailed prints about animated objects.\n:::\n:::info\nFor more information on setting up animated objects check out [animated objects tutorial](/docs/animated-objects).\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "animatedObjectPath",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [],
            "function_type": "method",
            "tags": [
                "Beta"
            ],
            "source": {
                "line": 706,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "DetachAnimatedObject",
            "desc": "Detaches the animated object from the `player_or_rig`.\n\n:::tip\nEnable [`initOptions.AnimatedObjectsDebugMode`](/api/AnimationsServer/#initOptions) for detailed prints about animated objects.\n:::\n:::info\nFor more information on setting up animated objects check out [animated objects tutorial](/docs/animated-objects).\n:::",
            "params": [
                {
                    "name": "player_or_rig",
                    "desc": "",
                    "lua_type": "Player | Model"
                },
                {
                    "name": "animatedObjectPath",
                    "desc": "",
                    "lua_type": "path"
                }
            ],
            "returns": [],
            "function_type": "method",
            "tags": [
                "Beta"
            ],
            "source": {
                "line": 723,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "DepsFolderPath",
            "desc": "Set the path to the dependencies folder if you have moved it from its original location inside of the root `Animations` folder.\n\n:::tip *added in version 2.0.0-rc1*\n:::",
            "lua_type": "nil",
            "source": {
                "line": 71,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AutoRegisterPlayers",
            "desc": "If set to true, player characters will automatically be registered on spawn. See [`Animations:Register()`](/api/AnimationsServer/#Register) for more info.\n\n:::warning\nMust have animation ids under [`rigType`](/api/AnimationIds#rigType) of **\"Player\"** in the [`AnimationIds`](/api/AnimationIds) module.\n:::\n\n:::tip *added in version 2.0.0-rc1*\n:::",
            "lua_type": "true",
            "source": {
                "line": 86,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AutoLoadAllPlayerTracks",
            "desc": "If set to true, all player animation tracks will be loaded for each player character on spawn.\n\n:::warning\nMust have animation ids under [`rigType`](/api/AnimationIds#rigType) of **\"Player\"** in the [`AnimationIds`](/api/AnimationIds) module.\n:::\n\n:::caution *changed in version 2.0.0-rc1*\nRenamed: ~~`AutoLoadPlayerTracks`~~ -> `AutoLoadAllPlayerTracks`\n\nWill automatically register players as well if [`AutoRegisterPlayers`](/api/AnimationsServer/#AutoRegisterPlayers) is not already set to true.\n:::",
            "lua_type": "false",
            "source": {
                "line": 104,
                "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.\n\n:::caution *changed in version 2.0.0-rc1*\nDefaults to `true`.\n:::",
            "lua_type": "true",
            "source": {
                "line": 116,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "EnableAutoCustomRBXAnimationIds",
            "desc": "If set to true, applies the [`AutoCustomRBXAnimationIds`](/api/AutoCustomRBXAnimationIds) module table to each player character on spawn.",
            "lua_type": "false",
            "source": {
                "line": 124,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "AnimatedObjectsDebugMode",
            "desc": "If set to true, prints will be made to help debug attaching and detaching animated objects.",
            "lua_type": "false",
            "source": {
                "line": 132,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "PreloadAsyncProgressed",
            "desc": "Fires when `ContentProvider:PreloadAsync()` finishes pre-loading one animation instance.\n\n```lua\n-- In a ServerScript\nAnimations.PreloadAsyncProgressed:Connect(function(n, total, loadedAnimInstance)\n\tprint(\"ContentProvider:PreloadAsync() finished pre-loading one:\", n, total, loadedAnimInstance)\nend)\n```\n\n:::tip *added in version 2.0.0-rc1*\n:::",
            "lua_type": "RBXScriptSignal",
            "source": {
                "line": 271,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        }
    ],
    "types": [
        {
            "name": "initOptions",
            "desc": "Gets applied to [`Properties`](#properties).",
            "fields": [
                {
                    "name": "AutoLoadAllPlayerTracks",
                    "lua_type": "false",
                    "desc": ""
                },
                {
                    "name": "AutoRegisterPlayers",
                    "lua_type": "true",
                    "desc": ""
                },
                {
                    "name": "TimeToLoadPrints",
                    "lua_type": "false",
                    "desc": ""
                },
                {
                    "name": "EnableAutoCustomRBXAnimationIds",
                    "lua_type": "false",
                    "desc": ""
                },
                {
                    "name": "AnimatedObjectsDebugMode",
                    "lua_type": "false",
                    "desc": ""
                }
            ],
            "source": {
                "line": 27,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "path",
            "desc": "```lua\n-- In a ServerScript\nlocal Animations = require(game.ReplicatedStorage.Animations.Package.AnimationsServer)\n\n\n-- These are all valid options for retrieving an animation track\nlocal animationPath = \"Jump\" -- A single key (any type)\n\nlocal animationPath = {\"Dodge\", Vector3.xAxis} -- An array path (values of any type)\n\nlocal animationPath = \"Climb.Right\" -- A path seperated by \".\" (string)\n\n\nlocal animationTrack = Animations:GetTrack(player, animationPath)\n```",
            "lua_type": "{any} | string",
            "source": {
                "line": 49,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "customRBXAnimationIds",
            "desc": "A table of animation ids to replace the default roblox animation ids.\n\n:::info\nRoblox applies the `\"walk\"` animation id for `R6` characters and the `\"run\"` animation id for `R15` characters (instead of both).\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": 290,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        },
        {
            "name": "humanoidRigTypeToCustomRBXAnimationIds",
            "desc": "A table mapping a humanoid rig type 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": 299,
                "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
            }
        }
    ],
    "name": "AnimationsServer",
    "desc": ":::note\nRoblox model path: `Animations.Package.AnimationsServer`\n:::",
    "realm": [
        "Server"
    ],
    "source": {
        "line": 60,
        "path": "src/ReplicatedStorage/Animations/Package/AnimationsServer.lua"
    }
}