Skip to main content

AnimationIds

Read Only
note

Roblox model path: Animations.Deps.AnimationIds

Types

rigType

type rigType = string

The first key in the AnimationIds module that indicates the type of rig the paired animation id table belongs to.

local AnimationIds = {
	Player = { -- `rigType` of "Player"
		Dodge = {
			[Enum.KeyCode.W] = 0000000,
			[Enum.KeyCode.S] = 0000000,
			[Enum.KeyCode.A] = 0000000,
			[Enum.KeyCode.D] = 0000000,
		},
		Run = 0000000,
		Walk = 0000000,
		Idle = 0000000
	}
}
info

The only preset rigType is that of "Player" for all player/client animation ids.

animationId

type animationId = number

idTable

interface idTable {
[any]idTable | animationId
}

HasProperties

type HasProperties = (
animationIdidTable,
propertiesSettings{
PriorityEnum.AnimationPriority?,
Loopedboolean?,
DoUnpackboolean?
}
){}
added in version 2.0.0
local AnimationIds = {
	Player = { -- `rigType` of "Player"
		Dodge = {
			[Enum.KeyCode.W] = 0000000,
			[Enum.KeyCode.S] = 0000000,
			[Enum.KeyCode.A] = 0000000,
			[Enum.KeyCode.D] = 0000000,
		},
		Run = 0000000,
		Walk = 0000000,
		Idle = 0000000,
		Sword = {
			-- Now when the "Sword.Walk" animation plays it will
			-- automatically have `Enum.AnimationPriority.Action` priority
			Walk = HasProperties(0000000, { Priority = Enum.AnimationPriority.Action })

			Idle = 0000000,
			Run = 0000000,

			-- Now when {"Sword", "AttackCombo", 1 or 2 or 3} animation
			-- plays it will automatically have `Enum.AnimationPriority.Action` priority
			AttackCombo = HasProperties({
				[1] = 0000000,
				[2] = 0000000,
				[3] = 0000000
			}, { Priority = Enum.AnimationPriority.Action })
		}
	},
}

HasAnimatedObject

Beta
type HasAnimatedObject = (
animationIdidTable,
animatedObjectPathpath,
animatedObjectSettings{
AutoAttachboolean?,
AutoDetachboolean?,
DoUnpackboolean?
}
){}
local AnimationIds = {
	Player = { -- `rigType` of "Player"
		Dodge = {
			[Enum.KeyCode.W] = 0000000,
			[Enum.KeyCode.S] = 0000000,
			[Enum.KeyCode.A] = 0000000,
			[Enum.KeyCode.D] = 0000000,
		},
		Run = 0000000,
		Walk = 0000000,
		Idle = 0000000,
		Sword = {
			-- Now when the "Sword.Walk" animation plays "Sword" will
			-- auto attach to the player and get animated
			Walk = HasAnimatedObject(0000000, "Sword", { AutoAttach = true })

			Idle = 0000000,
			Run = 0000000,

			-- Now when {"Sword", "AttackCombo", 1 or 2 or 3} animation
			-- plays "Sword" will auto attach to the player and get
			-- animated
			AttackCombo = HasAnimatedObject({
				[1] = 0000000,
				[2] = 0000000,
				[3] = 0000000
			}, "Sword", { AutoAttach = true })
		}
	},
}
info

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

AnimationIds

interface AnimationIds {
[rigType]idTable
}
local AnimationIds = {
	Player = { -- `rigType` of "Player"
		Dodge = {
			[Enum.KeyCode.W] = 0000000,
			[Enum.KeyCode.S] = 0000000,
			[Enum.KeyCode.A] = 0000000,
			[Enum.KeyCode.D] = 0000000,
		},
		Run = 0000000,
		Walk = 0000000,
		Idle = 0000000
	},

	BigMonster = { -- `rigType` of "BigMonster"
		HardMode = {
			Attack1 = 0000000,
			Attack2 = 0000000
		},
		EasyMode = {
			Attack1 = 0000000,
			Attack2 = 0000000
		}
	},

	SmallMonster = { -- `rigType` of "SmallMonster"
		HardMode = {
			Attack1 = 0000000,
			Attack2 = 0000000
		},
		EasyMode = {
			Attack1 = 0000000,
			Attack2 = 0000000
		}
	}
}
Show raw api
{
    "functions": [],
    "properties": [],
    "types": [
        {
            "name": "rigType",
            "desc": "The first key in the `AnimationIds` module that indicates the type of rig the paired animation id table belongs to.\n\n```lua\nlocal AnimationIds = {\n\tPlayer = { -- `rigType` of \"Player\"\n\t\tDodge = {\n\t\t\t[Enum.KeyCode.W] = 0000000,\n\t\t\t[Enum.KeyCode.S] = 0000000,\n\t\t\t[Enum.KeyCode.A] = 0000000,\n\t\t\t[Enum.KeyCode.D] = 0000000,\n\t\t},\n\t\tRun = 0000000,\n\t\tWalk = 0000000,\n\t\tIdle = 0000000\n\t}\n}\n```\n\n:::info\nThe only preset `rigType` is that of **\"Player\"** for all player/client animation ids.\n:::",
            "lua_type": "string",
            "source": {
                "line": 33,
                "path": "src/ReplicatedStorage/Animations/Deps/AnimationIds.lua"
            }
        },
        {
            "name": "animationId",
            "desc": "",
            "lua_type": "number",
            "source": {
                "line": 38,
                "path": "src/ReplicatedStorage/Animations/Deps/AnimationIds.lua"
            }
        },
        {
            "name": "idTable",
            "desc": "",
            "fields": [
                {
                    "name": "[any]",
                    "lua_type": "idTable | animationId",
                    "desc": ""
                }
            ],
            "source": {
                "line": 44,
                "path": "src/ReplicatedStorage/Animations/Deps/AnimationIds.lua"
            }
        },
        {
            "name": "HasProperties",
            "desc": ":::tip *added in version 2.0.0*\n:::\n\n```lua\nlocal AnimationIds = {\n\tPlayer = { -- `rigType` of \"Player\"\n\t\tDodge = {\n\t\t\t[Enum.KeyCode.W] = 0000000,\n\t\t\t[Enum.KeyCode.S] = 0000000,\n\t\t\t[Enum.KeyCode.A] = 0000000,\n\t\t\t[Enum.KeyCode.D] = 0000000,\n\t\t},\n\t\tRun = 0000000,\n\t\tWalk = 0000000,\n\t\tIdle = 0000000,\n\t\tSword = {\n\t\t\t-- Now when the \"Sword.Walk\" animation plays it will\n\t\t\t-- automatically have `Enum.AnimationPriority.Action` priority\n\t\t\tWalk = HasProperties(0000000, { Priority = Enum.AnimationPriority.Action })\n\n\t\t\tIdle = 0000000,\n\t\t\tRun = 0000000,\n\n\t\t\t-- Now when {\"Sword\", \"AttackCombo\", 1 or 2 or 3} animation\n\t\t\t-- plays it will automatically have `Enum.AnimationPriority.Action` priority\n\t\t\tAttackCombo = HasProperties({\n\t\t\t\t[1] = 0000000,\n\t\t\t\t[2] = 0000000,\n\t\t\t\t[3] = 0000000\n\t\t\t}, { Priority = Enum.AnimationPriority.Action })\n\t\t}\n\t},\n}\n```",
            "lua_type": "(animationId: idTable, propertiesSettings: {Priority: Enum.AnimationPriority?, Looped: boolean?, DoUnpack: boolean?}): {}",
            "source": {
                "line": 84,
                "path": "src/ReplicatedStorage/Animations/Deps/AnimationIds.lua"
            }
        },
        {
            "name": "HasAnimatedObject",
            "desc": "```lua\nlocal AnimationIds = {\n\tPlayer = { -- `rigType` of \"Player\"\n\t\tDodge = {\n\t\t\t[Enum.KeyCode.W] = 0000000,\n\t\t\t[Enum.KeyCode.S] = 0000000,\n\t\t\t[Enum.KeyCode.A] = 0000000,\n\t\t\t[Enum.KeyCode.D] = 0000000,\n\t\t},\n\t\tRun = 0000000,\n\t\tWalk = 0000000,\n\t\tIdle = 0000000,\n\t\tSword = {\n\t\t\t-- Now when the \"Sword.Walk\" animation plays \"Sword\" will\n\t\t\t-- auto attach to the player and get animated\n\t\t\tWalk = HasAnimatedObject(0000000, \"Sword\", { AutoAttach = true })\n\n\t\t\tIdle = 0000000,\n\t\t\tRun = 0000000,\n\n\t\t\t-- Now when {\"Sword\", \"AttackCombo\", 1 or 2 or 3} animation\n\t\t\t-- plays \"Sword\" will auto attach to the player and get\n\t\t\t-- animated\n\t\t\tAttackCombo = HasAnimatedObject({\n\t\t\t\t[1] = 0000000,\n\t\t\t\t[2] = 0000000,\n\t\t\t\t[3] = 0000000\n\t\t\t}, \"Sword\", { AutoAttach = true })\n\t\t}\n\t},\n}\n```\n\n:::info\nFor more information on setting up animated objects check out [animated objects tutorial](/docs/animated-objects).\n:::",
            "lua_type": "(animationId: idTable, animatedObjectPath: path, animatedObjectSettings: {AutoAttach: boolean?, AutoDetach: boolean?, DoUnpack: boolean?}): {}",
            "tags": [
                "Beta"
            ],
            "source": {
                "line": 127,
                "path": "src/ReplicatedStorage/Animations/Deps/AnimationIds.lua"
            }
        },
        {
            "name": "AnimationIds",
            "desc": "```lua\nlocal AnimationIds = {\n\tPlayer = { -- `rigType` of \"Player\"\n\t\tDodge = {\n\t\t\t[Enum.KeyCode.W] = 0000000,\n\t\t\t[Enum.KeyCode.S] = 0000000,\n\t\t\t[Enum.KeyCode.A] = 0000000,\n\t\t\t[Enum.KeyCode.D] = 0000000,\n\t\t},\n\t\tRun = 0000000,\n\t\tWalk = 0000000,\n\t\tIdle = 0000000\n\t},\n\n\tBigMonster = { -- `rigType` of \"BigMonster\"\n\t\tHardMode = {\n\t\t\tAttack1 = 0000000,\n\t\t\tAttack2 = 0000000\n\t\t},\n\t\tEasyMode = {\n\t\t\tAttack1 = 0000000,\n\t\t\tAttack2 = 0000000\n\t\t}\n\t},\n\n\tSmallMonster = { -- `rigType` of \"SmallMonster\"\n\t\tHardMode = {\n\t\t\tAttack1 = 0000000,\n\t\t\tAttack2 = 0000000\n\t\t},\n\t\tEasyMode = {\n\t\t\tAttack1 = 0000000,\n\t\t\tAttack2 = 0000000\n\t\t}\n\t}\n}\n```",
            "fields": [
                {
                    "name": "[rigType]",
                    "lua_type": "idTable",
                    "desc": ""
                }
            ],
            "source": {
                "line": 171,
                "path": "src/ReplicatedStorage/Animations/Deps/AnimationIds.lua"
            }
        }
    ],
    "name": "AnimationIds",
    "desc": ":::note\nRoblox model path: `Animations.Deps.AnimationIds`\n:::",
    "tags": [
        "Read Only"
    ],
    "source": {
        "line": 180,
        "path": "src/ReplicatedStorage/Animations/Deps/AnimationIds.lua"
    }
}