Skip to main content

AnimationGroup

A group of weighted tracks that can be played back with weighted probability. The closest example to this is the idle animation that looks around at a 1:10 ratio when you're standing still in default Roblox animation script.

Functions

new

AnimationGroup.new(weightedTracks{WeightedTrack}) → AnimationGroup

Play

AnimationGroup:Play(transitionTimenumber) → ()

Plays the animations

SetWeightedTracks

AnimationGroup:SetWeightedTracks(
weightedTracks{WeightedTrack},
transitionTimenumber | nil
) → ()

Stop

AnimationGroup:Stop(transitionTimenumber) → ()

Stops the animations

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "",
            "params": [
                {
                    "name": "weightedTracks",
                    "desc": "",
                    "lua_type": "{ WeightedTrack }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationGroup"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 23,
                "path": "src/animationgroup/src/Shared/AnimationGroup.lua"
            }
        },
        {
            "name": "Play",
            "desc": "Plays the animations",
            "params": [
                {
                    "name": "transitionTime",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 43,
                "path": "src/animationgroup/src/Shared/AnimationGroup.lua"
            }
        },
        {
            "name": "SetWeightedTracks",
            "desc": "",
            "params": [
                {
                    "name": "weightedTracks",
                    "desc": "",
                    "lua_type": "{ WeightedTrack }"
                },
                {
                    "name": "transitionTime",
                    "desc": "",
                    "lua_type": "number | nil"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 57,
                "path": "src/animationgroup/src/Shared/AnimationGroup.lua"
            }
        },
        {
            "name": "Stop",
            "desc": "Stops the animations",
            "params": [
                {
                    "name": "transitionTime",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 76,
                "path": "src/animationgroup/src/Shared/AnimationGroup.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "AnimationGroup",
    "desc": "A group of weighted tracks that can be played back with weighted probability.\nThe closest example to this is the idle animation that looks around at a 1:10\nratio when you're standing still in default Roblox animation script.",
    "source": {
        "line": 8,
        "path": "src/animationgroup/src/Shared/AnimationGroup.lua"
    }
}