Skip to main content

R15Utils

Utility methods for R15 Characters

Functions

searchForRigAttachment

R15Utils.searchForRigAttachment(
characterModel,
partNamestring,
attachmentNamestring
) → Attachment?

Searches the rig for an attachment

getRigMotor

R15Utils.getRigMotor(
characterModel,
partNamestring,
motorNamestring
) → Motor6D?

Finds a rig motor

getUpperTorso

R15Utils.getUpperTorso(characterModel) → BasePart?

Retrieves the upper torso

getLowerTorso

R15Utils.getLowerTorso(characterModel) → BasePart?

Retrieves the lower torso

getWaistJoint

R15Utils.getWaistJoint(characterModel) → Motor6D?

Retrieves the waist joint

getNeckJoint

R15Utils.getNeckJoint(characterModel) → Motor6D?

Retrieves the neck joint

getHand

R15Utils.getHand(
characterModel,
side"Left" | "Right"
) → Attachment?

Retrieves hand attachment

getGripWeld

R15Utils.getGripWeld(
characterModel,
side"Left" | "Right"
) → Motor6D?

Retrieves grip weld

getGripWeldName

R15Utils.getGripWeldName(side"Left" | "Right") → "LeftGrip" | "RightGrip"

Retrieves grip weld name for a given side

getHandName

R15Utils.getHandName(side"Left" | "Right") → "LeftHand" | "RightHand"

Retrieves grip weld name for a given side

getGripAttachmentName

R15Utils.getGripAttachmentName(side"Left" | "Right") → "LeftGripAttachment" | "RightGripAttachment"

Retrieves the grip attachment name

getShoulderRigAttachment

R15Utils.getShoulderRigAttachment(
characterModel,
side"Left" | "Right"
) → Attachment?

Retrieves the shoulder rig attachment

getGripAttachment

R15Utils.getGripAttachment(
characterModel,
side"Left" | "Right"
) → Attachment?

Retrieves the grip attachment for the given side

getExpectedRootPartYOffset

R15Utils.getExpectedRootPartYOffset(humanoidHumanoid) → number?

Retrieves the expected root part y offset for a humanoid

getRigLength

R15Utils.getRigLength(
characterModel,
partNamestring,
rigAttachment0string,
rigAttachment1string
) → number?

Gets the length of a segment for a rig

addLengthsOrNil

R15Utils.addLengthsOrNil(lengths{number?}) → number?

Adds the lengths together

getUpperArmRigLength

R15Utils.getUpperArmRigLength(
characterModel,
side"Left" | "Right"
) → number?

Retrieves the upper arm length for a character

getLowerArmRigLength

R15Utils.getLowerArmRigLength(
characterModel,
side"Left" | "Right"
) → number?

Retrieves the lower arm length for a character

getWristToGripLength

R15Utils.getWristToGripLength(
characterModel,
side"Left" | "Right"
) → number?

Retrieves the wrist to hand length

getArmRigToGripLength

R15Utils.getArmRigToGripLength(
characterModel,
side"Left" | "Right"
) → number?

Computes the length of an arm for a given character

Show raw api
{
    "functions": [
        {
            "name": "searchForRigAttachment",
            "desc": "Searches the rig for an attachment",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "partName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "attachmentName",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Attachment?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 15,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getRigMotor",
            "desc": "Finds a rig motor",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "partName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "motorName",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Motor6D?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 31,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getUpperTorso",
            "desc": "Retrieves the upper torso",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "BasePart?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 55,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getLowerTorso",
            "desc": "Retrieves the lower torso",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "BasePart?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 64,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getWaistJoint",
            "desc": "Retrieves the waist joint",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Motor6D?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 73,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getNeckJoint",
            "desc": "Retrieves the neck joint",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Motor6D?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 87,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getHand",
            "desc": "Retrieves hand attachment",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "\"Left\" | \"Right\""
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Attachment?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 102,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getGripWeld",
            "desc": "Retrieves grip weld",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "\"Left\" | \"Right\""
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Motor6D?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 112,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getGripWeldName",
            "desc": "Retrieves grip weld name for a given side",
            "params": [
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "\"Left\" | \"Right\""
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "\"LeftGrip\" | \"RightGrip\""
                }
            ],
            "function_type": "static",
            "source": {
                "line": 126,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getHandName",
            "desc": "Retrieves grip weld name for a given side",
            "params": [
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "\"Left\" | \"Right\""
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "\"LeftHand\" | \"RightHand\""
                }
            ],
            "function_type": "static",
            "source": {
                "line": 141,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getGripAttachmentName",
            "desc": "Retrieves the grip attachment name",
            "params": [
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "\"Left\" | \"Right\""
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "\"LeftGripAttachment\" | \"RightGripAttachment\""
                }
            ],
            "function_type": "static",
            "source": {
                "line": 156,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getShoulderRigAttachment",
            "desc": "Retrieves the shoulder rig attachment",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "\"Left\" | \"Right\""
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Attachment?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 172,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getGripAttachment",
            "desc": "Retrieves the grip attachment for the given side",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "\"Left\" | \"Right\""
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Attachment?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 188,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getExpectedRootPartYOffset",
            "desc": "Retrieves the expected root part y offset for a humanoid",
            "params": [
                {
                    "name": "humanoid",
                    "desc": "",
                    "lua_type": "Humanoid"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 203,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getRigLength",
            "desc": "Gets the length of a segment for a rig",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "partName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "rigAttachment0",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "rigAttachment1",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 220,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "addLengthsOrNil",
            "desc": "Adds the lengths together",
            "params": [
                {
                    "name": "lengths",
                    "desc": "",
                    "lua_type": "{ number? }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 239,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getUpperArmRigLength",
            "desc": "Retrieves the upper arm length for a character",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "\"Left\" | \"Right\""
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 258,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getLowerArmRigLength",
            "desc": "Retrieves the lower arm length for a character",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "\"Left\" | \"Right\""
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 274,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getWristToGripLength",
            "desc": "Retrieves the wrist to hand length",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "\"Left\" | \"Right\""
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 290,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getArmRigToGripLength",
            "desc": "Computes the length of an arm for a given character",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "\"Left\" | \"Right\""
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 317,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "R15Utils",
    "desc": "Utility methods for R15 Characters",
    "source": {
        "line": 5,
        "path": "src/r15utils/src/Shared/R15Utils.lua"
    }
}