Skip to main content

CharacterSeatUtil

Functions

calculateSeatOffset

CharacterSeatUtil.calculateSeatOffset(characterModel) → number

setSeatOffset

CharacterSeatUtil.setSeatOffset(
characterModel,
offsetnumber?
) → ()

Sets the SeatOffset Attribute. If offset is not passed, calculates the current one and uses that value.

getSeatOffset

CharacterSeatUtil.getSeatOffset(characterModel) → number

Returns the set SeatOffset Attribute. If attribute is not set, calculates and returns the seat offset.

unseatCharacter

CharacterSeatUtil.unseatCharacter(
seatBasePart,
characterModel
) → ()

Seats the Character to a BasePart

unseatCharacter

CharacterSeatUtil.unseatCharacter(characterModel) → ()

Unseats the Character

Show raw api
{
    "functions": [
        {
            "name": "calculateSeatOffset",
            "desc": "Calculates the offset from a Character model to the seat.\nSource: https://devforum.roblox.com/t/humanoidrootpart-positioning-adjustment-for-automatically-scaled-humanoids/258555",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 14,
                "path": "src/shared/plugins/customSeat/shared/characterSeatUtil.lua"
            }
        },
        {
            "name": "setSeatOffset",
            "desc": "Sets the SeatOffset Attribute. If offset is not passed, calculates the current one and uses that value.",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "offset",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 58,
                "path": "src/shared/plugins/customSeat/shared/characterSeatUtil.lua"
            }
        },
        {
            "name": "getSeatOffset",
            "desc": "Returns the set SeatOffset Attribute. If attribute is not set, calculates and returns the seat offset.",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 69,
                "path": "src/shared/plugins/customSeat/shared/characterSeatUtil.lua"
            }
        },
        {
            "name": "unseatCharacter",
            "desc": "Seats the Character to a BasePart",
            "params": [
                {
                    "name": "seat",
                    "desc": "",
                    "lua_type": "BasePart"
                },
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 83,
                "path": "src/shared/plugins/customSeat/shared/characterSeatUtil.lua"
            }
        },
        {
            "name": "unseatCharacter",
            "desc": "Unseats the Character",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 113,
                "path": "src/shared/plugins/customSeat/shared/characterSeatUtil.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "CharacterSeatUtil",
    "desc": "",
    "source": {
        "line": 4,
        "path": "src/shared/plugins/customSeat/shared/characterSeatUtil.lua"
    }
}