Skip to main content

AnimationTrackUtils

Utility functions for animations

Functions​

loadAnimationFromId​

AnimationTrackUtils.loadAnimationFromId(
animatorOrHumanoid: Humanoid | Animator,
animationId: string
) → Animation

Loads an animation from the animation id

setWeightTargetIfNotSet​

AnimationTrackUtils.setWeightTargetIfNotSet(
weight: number,
fadeTime: number
) → Animation

Sets the weight target if not set

Show raw api
{
    "functions": [
        {
            "name": "loadAnimationFromId",
            "desc": "Loads an animation from the animation id",
            "params": [
                {
                    "name": "animatorOrHumanoid",
                    "desc": "",
                    "lua_type": "Humanoid | Animator"
                },
                {
                    "name": "animationId",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Animation"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 15,
                "path": "src/animationtrackutils/src/Shared/AnimationTrackUtils.lua"
            }
        },
        {
            "name": "setWeightTargetIfNotSet",
            "desc": "Sets the weight target if not set",
            "params": [
                {
                    "name": "track",
                    "desc": "",
                    "lua_type": "AnimationTrack"
                },
                {
                    "name": "weight",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Animation"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 31,
                "path": "src/animationtrackutils/src/Shared/AnimationTrackUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "AnimationTrackUtils",
    "desc": "Utility functions for animations",
    "source": {
        "line": 6,
        "path": "src/animationtrackutils/src/Shared/AnimationTrackUtils.lua"
    }
}