Skip to main content

AnimationUtils

Functions

playAnimation

AnimationUtils.playAnimation(
idstring | number,
fadeTimenumber?,
weightnumber?,
speednumber?,
) → AnimationTrack?

Plays the animation on the target instance.

stopAnimation

AnimationUtils.stopAnimation(
idstring | number,
fadeTimenumber?
) → AnimationTrack?

Stops the animation on the target instance.

getOrCreateAnimationTrack

AnimationUtils.getOrCreateAnimationTrack(
idstring | number,
) → AnimationTrack?

Gets or creates an animation track for the player

getOrCreateAnimationFromIdInAnimator

AnimationUtils.getOrCreateAnimationFromIdInAnimator(
animatorAnimator,
idstring | number
) → Animation?

Gets or creates an animation from the id in the animator

findAnimationTrack

AnimationUtils.findAnimationTrack(
idstring | number
) → AnimationTrack?

Finds an animation track

findAnimationTrackInAnimator

AnimationUtils.findAnimationTrackInAnimator(
animatorAnimator,
idstring | number
) → AnimationTrack?

Finds an animation track in an animator

getOrCreateAnimator

AnimationUtils.getOrCreateAnimator(targetAnimator | Player | Model | AnimationController) → Animator?

Finds an animator for the current instance

getAnimationName

AnimationUtils.getAnimationName(animationIdstring) → string

Gets a specific animation name for an animation id

createAnimationFromId

AnimationUtils.createAnimationFromId(idstring | number) → Animation

Creates a new animation object from the given id

Show raw api
{
    "functions": [
        {
            "name": "playAnimation",
            "desc": "Plays the animation on the target instance.",
            "params": [
                {
                    "name": "target",
                    "desc": "",
                    "lua_type": "Animator | Player | Model | AnimationController"
                },
                {
                    "name": "id",
                    "desc": "",
                    "lua_type": "string | number"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "weight",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "speed",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "priority",
                    "desc": "",
                    "lua_type": "AnimationPriority?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 18,
                "path": "src/animations/src/Shared/AnimationUtils.lua"
            }
        },
        {
            "name": "stopAnimation",
            "desc": "Stops the animation on the target instance.",
            "params": [
                {
                    "name": "target",
                    "desc": "",
                    "lua_type": "Animator | Player | Model | AnimationController"
                },
                {
                    "name": "id",
                    "desc": "",
                    "lua_type": "string | number"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 50,
                "path": "src/animations/src/Shared/AnimationUtils.lua"
            }
        },
        {
            "name": "getOrCreateAnimationTrack",
            "desc": "Gets or creates an animation track for the player",
            "params": [
                {
                    "name": "target",
                    "desc": "",
                    "lua_type": "Animator | Player | Model | AnimationController"
                },
                {
                    "name": "id",
                    "desc": "",
                    "lua_type": "string | number"
                },
                {
                    "name": "priority",
                    "desc": "",
                    "lua_type": "AnimationPriority?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 67,
                "path": "src/animations/src/Shared/AnimationUtils.lua"
            }
        },
        {
            "name": "getOrCreateAnimationFromIdInAnimator",
            "desc": "Gets or creates an animation from the id in the animator",
            "params": [
                {
                    "name": "animator",
                    "desc": "",
                    "lua_type": "Animator"
                },
                {
                    "name": "id",
                    "desc": "",
                    "lua_type": "string | number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Animation?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 104,
                "path": "src/animations/src/Shared/AnimationUtils.lua"
            }
        },
        {
            "name": "findAnimationTrack",
            "desc": "Finds an animation track",
            "params": [
                {
                    "name": "target",
                    "desc": "",
                    "lua_type": "Animator | Player | Model | AnimationController"
                },
                {
                    "name": "id",
                    "desc": "",
                    "lua_type": "string | number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 126,
                "path": "src/animations/src/Shared/AnimationUtils.lua"
            }
        },
        {
            "name": "findAnimationTrackInAnimator",
            "desc": "Finds an animation track in an animator",
            "params": [
                {
                    "name": "animator",
                    "desc": "",
                    "lua_type": "Animator"
                },
                {
                    "name": "id",
                    "desc": "",
                    "lua_type": "string | number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrack?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 143,
                "path": "src/animations/src/Shared/AnimationUtils.lua"
            }
        },
        {
            "name": "getOrCreateAnimator",
            "desc": "Finds an animator for the current instance",
            "params": [
                {
                    "name": "target",
                    "desc": "",
                    "lua_type": "Animator | Player | Model | AnimationController"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Animator?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 162,
                "path": "src/animations/src/Shared/AnimationUtils.lua"
            }
        },
        {
            "name": "getAnimationName",
            "desc": "Gets a specific animation name for an animation id",
            "params": [
                {
                    "name": "animationId",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 203,
                "path": "src/animations/src/Shared/AnimationUtils.lua"
            }
        },
        {
            "name": "createAnimationFromId",
            "desc": "Creates a new animation object from the given id",
            "params": [
                {
                    "name": "id",
                    "desc": "",
                    "lua_type": "string | number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Animation\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 210,
                "path": "src/animations/src/Shared/AnimationUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "AnimationUtils",
    "desc": "",
    "source": {
        "line": 4,
        "path": "src/animations/src/Shared/AnimationUtils.lua"
    }
}