Skip to main content

R15Utils

Utility methods for R15 Characters. R15 is a specific Roblox character specification.

Functions

searchForRigAttachment

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

Searches the rig for an attachment

getRigMotor

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

Finds a rig motor

isAnimationConstraintOrMotor6D

R15Utils.isAnimationConstraintOrMotor6D(instanceInstance) → boolean

Determines if the instance is a Motor6D or AnimationConstraint

getUpperTorso

R15Utils.getUpperTorso(characterModel) → BasePart?

Retrieves the upper torso

getLowerTorso

R15Utils.getLowerTorso(characterModel) → BasePart?

Retrieves the lower torso

getBodyPart

R15Utils.getBodyPart(
characterModel,
partNamestring
) → BasePart?

Gets a body part for a character

getWaistJoint

R15Utils.getWaistJoint(characterModel) → AnimationConstraintOrMotor6D?

Retrieves the waist joint

getNeckJoint

R15Utils.getNeckJoint(characterModel) → AnimationConstraintOrMotor6D?

Retrieves the neck joint

getHand

R15Utils.getHand(
characterModel,
sideR15Side
) → BasePart?

Retrieves hand attachment

getGripWeld

R15Utils.getGripWeld(
characterModel,
sideR15Side
) → AnimationConstraintOrMotor6D?

Retrieves grip weld

getGripWeldName

R15Utils.getGripWeldName(sideR15Side) → "LeftGrip" | "RightGrip"

Retrieves grip weld name for a given side

getHandName

R15Utils.getHandName(sideR15Side) → "LeftHand" | "RightHand"

Retrieves hand name for a given side

getGripAttachmentName

R15Utils.getGripAttachmentName(sideR15Side) → "LeftGripAttachment" | "RightGripAttachment"

Retrieves the grip attachment name

getShoulderRigAttachment

R15Utils.getShoulderRigAttachment(
characterModel,
sideR15Side
) → Attachment?

Retrieves the shoulder rig attachment

getGripAttachment

R15Utils.getGripAttachment(
characterModel,
sideR15Side
) → 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,
sideR15Side
) → number?

Retrieves the upper arm length for a character

getLowerArmRigLength

R15Utils.getLowerArmRigLength(
characterModel,
sideR15Side
) → number?

Retrieves the lower arm length for a character

getWristToGripLength

R15Utils.getWristToGripLength(
characterModel,
sideR15Side
) → number?

Retrieves the wrist to hand length

getHumanoidScaleProperty

R15Utils.getHumanoidScaleProperty(
humanoidHumanoid,
scaleValueNamestring
) → number?

Retrieves the humanoid scale property

getArmRigToGripLength

R15Utils.getArmRigToGripLength(
characterModel,
sideR15Side
) → 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?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 17,
                "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": "AnimationConstraintOrMotor6D?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 34,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "isAnimationConstraintOrMotor6D",
            "desc": "Determines if the instance is a Motor6D or AnimationConstraint",
            "params": [
                {
                    "name": "instance",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 55,
                "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?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 62,
                "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?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 69,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getBodyPart",
            "desc": "Gets a body part for a character",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "partName",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "BasePart?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 76,
                "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": "AnimationConstraintOrMotor6D?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 92,
                "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": "AnimationConstraintOrMotor6D?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 99,
                "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": "R15Side"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "BasePart?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 106,
                "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": "R15Side"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AnimationConstraintOrMotor6D?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 118,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getGripWeldName",
            "desc": "Retrieves grip weld name for a given side",
            "params": [
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "R15Side"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "\"LeftGrip\" | \"RightGrip\"\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 135,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getHandName",
            "desc": "Retrieves hand name for a given side",
            "params": [
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "R15Side"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "\"LeftHand\" | \"RightHand\"\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 148,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getGripAttachmentName",
            "desc": "Retrieves the grip attachment name",
            "params": [
                {
                    "name": "side",
                    "desc": "",
                    "lua_type": "R15Side"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "\"LeftGripAttachment\" | \"RightGripAttachment\"\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 161,
                "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": "R15Side"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Attachment?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 174,
                "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": "R15Side"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Attachment?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 187,
                "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?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 200,
                "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\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 212,
                "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?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 234,
                "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": "R15Side"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 250,
                "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": "R15Side"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 268,
                "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": "R15Side"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 281,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        },
        {
            "name": "getHumanoidScaleProperty",
            "desc": "Retrieves the humanoid scale property",
            "params": [
                {
                    "name": "humanoid",
                    "desc": "",
                    "lua_type": "Humanoid"
                },
                {
                    "name": "scaleValueName",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 294,
                "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": "R15Side"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 308,
                "path": "src/r15utils/src/Shared/R15Utils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "R15Utils",
    "desc": "Utility methods for R15 Characters. R15 is a specific Roblox character specification.",
    "source": {
        "line": 7,
        "path": "src/r15utils/src/Shared/R15Utils.lua"
    }
}