Skip to main content

AnimationTrackPlayer

Plays a single track, allowing for the animation to be controlled easier.

Functions

new

AnimationTrackPlayer.new(
animationTargetValueObject.Mountable<Instance?>,
animationIdAnimationId?
) → AnimationTrackPlayer

Plays an animation track in the target. Async loads the track when all data is found.

SetAnimationId

AnimationTrackPlayer.SetAnimationId(
animationIdValueObject.Mountable<AnimationId?>
) → Maid.MaidTask

Sets the animation id to play

GetAnimationId

AnimationTrackPlayer.GetAnimationId(selfAnimationTrackPlayer) → AnimationId?

Returns the current animation id

SetAnimationTarget

AnimationTrackPlayer.SetAnimationTarget(
animationTargetValueObject.Mountable<Instance?>
) → Maid.MaidTask

Sets an animation target to play the animation on

SetWeightTargetIfNotSet

AnimationTrackPlayer.SetWeightTargetIfNotSet(
weightnumber?,
fadeTimenumber?
) → ()

Sets the weight target if it hasn't been set

Play

AnimationTrackPlayer.Play(
fadeTimenumber?,
weightnumber?,
speednumber
) → ()

Plays the current animation specified

Stop

AnimationTrackPlayer.Stop(
fadeTimenumber?
) → ()

Stops the current animation

AdjustWeight

AnimationTrackPlayer.AdjustWeight(
weightnumber?,
fadeTimenumber?
) → ()

Adjusts the weight of the animation track

AdjustSpeed

AnimationTrackPlayer.AdjustSpeed(
speednumber?
) → ()

Adjusts the speed of the animation track

IsPlaying

AnimationTrackPlayer.IsPlaying(selfAnimationTrackPlayer) → boolean

Returns true if playing

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Plays an animation track in the target. Async loads the track when\nall data is found.",
            "params": [
                {
                    "name": "animationTarget",
                    "desc": "",
                    "lua_type": "ValueObject.Mountable<Instance?>"
                },
                {
                    "name": "animationId",
                    "desc": "",
                    "lua_type": "AnimationId?\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationTrackPlayer\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 43,
                "path": "src/animations/src/Shared/AnimationTrackPlayer.lua"
            }
        },
        {
            "name": "SetAnimationId",
            "desc": "Sets the animation id to play",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AnimationTrackPlayer"
                },
                {
                    "name": "animationId",
                    "desc": "",
                    "lua_type": "ValueObject.Mountable<AnimationId?>\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Maid.MaidTask\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 111,
                "path": "src/animations/src/Shared/AnimationTrackPlayer.lua"
            }
        },
        {
            "name": "GetAnimationId",
            "desc": "Returns the current animation id",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AnimationTrackPlayer"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationId?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 121,
                "path": "src/animations/src/Shared/AnimationTrackPlayer.lua"
            }
        },
        {
            "name": "SetAnimationTarget",
            "desc": "Sets an animation target to play the animation on",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AnimationTrackPlayer"
                },
                {
                    "name": "animationTarget",
                    "desc": "",
                    "lua_type": "ValueObject.Mountable<Instance?>\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Maid.MaidTask\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 128,
                "path": "src/animations/src/Shared/AnimationTrackPlayer.lua"
            }
        },
        {
            "name": "SetWeightTargetIfNotSet",
            "desc": "Sets the weight target if it hasn't been set",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AnimationTrackPlayer"
                },
                {
                    "name": "weight",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?\n"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 138,
                "path": "src/animations/src/Shared/AnimationTrackPlayer.lua"
            }
        },
        {
            "name": "Play",
            "desc": "Plays the current animation specified",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AnimationTrackPlayer"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "weight",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "speed",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 153,
                "path": "src/animations/src/Shared/AnimationTrackPlayer.lua"
            }
        },
        {
            "name": "Stop",
            "desc": "Stops the current animation",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AnimationTrackPlayer"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 171,
                "path": "src/animations/src/Shared/AnimationTrackPlayer.lua"
            }
        },
        {
            "name": "AdjustWeight",
            "desc": "Adjusts the weight of the animation track",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AnimationTrackPlayer"
                },
                {
                    "name": "weight",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "fadeTime",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 181,
                "path": "src/animations/src/Shared/AnimationTrackPlayer.lua"
            }
        },
        {
            "name": "AdjustSpeed",
            "desc": "Adjusts the speed of the animation track",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AnimationTrackPlayer"
                },
                {
                    "name": "speed",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 190,
                "path": "src/animations/src/Shared/AnimationTrackPlayer.lua"
            }
        },
        {
            "name": "IsPlaying",
            "desc": "Returns true if playing",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AnimationTrackPlayer"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 199,
                "path": "src/animations/src/Shared/AnimationTrackPlayer.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "AnimationTrackPlayer",
    "desc": "Plays a single track, allowing for the animation to be controlled easier.",
    "source": {
        "line": 7,
        "path": "src/animations/src/Shared/AnimationTrackPlayer.lua"
    }
}