Skip to main content

MoverStart

The step a mover walks toward first. HumanoidMover and CFrameMover both use it, and a mover of your own should too.

Functions​

Choose​

MoverStart.Choose(
path: Path,
position: Vector3,--

Where the rig is.

skipDistance: number--

Horizontal distance within which a leading step is already reached.

) → number--

The index of the first step to walk toward; #path + 1 only when the path is empty.

Skips the run of leading plain Walk steps that sit within skipDistance of position, or that the rig is already past (it is at least as close to the step after as that step is). A labelled, Jump or Custom step is never skipped, even one under the agent: it carries meaning (a door at the agent's feet) that StepReached must report. The last step is never skipped either, so there is always something to walk toward.

Show raw api
{
    "functions": [
        {
            "name": "Choose",
            "desc": "Skips the run of leading plain `Walk` steps that sit within `skipDistance` of `position`, or\nthat the rig is already past (it is at least as close to the step after as that step is). A\nlabelled, `Jump` or `Custom` step is never skipped, even one under the agent: it carries\nmeaning (a door at the agent's feet) that `StepReached` must report. The last step is never\nskipped either, so there is always something to walk toward.",
            "params": [
                {
                    "name": "path",
                    "desc": "",
                    "lua_type": "Path"
                },
                {
                    "name": "position",
                    "desc": "Where the rig is.",
                    "lua_type": "Vector3"
                },
                {
                    "name": "skipDistance",
                    "desc": "Horizontal distance within which a leading step is already reached.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "The index of the first step to walk toward; `#path + 1` only when the path is empty.",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 35,
                "path": "lib/Movers/Start.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "MoverStart",
    "desc": "The step a mover walks toward first. [HumanoidMover] and [CFrameMover] both use it, and a\nmover of your own should too.",
    "source": {
        "line": 21,
        "path": "lib/Movers/Start.luau"
    }
}