Skip to main content

RaceManager

This item only works when running on the server. Server

Controls anything race related, handles cosmetics and rolling.

Functions

InitCosmetics

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
RaceManager.InitCosmetics(characterModel) → ()

Handles the addition of character race cosmetics. Also responsible for the calls of RaceFunctions.Init

Possibly yields for DatastoreModule.WaitForSlotData

CheckRace

RaceManager.CheckRace(
characterCharacter,
rerollboolean?--

Forces a reroll regardless of race

) → ()

Checks the characters race and rolls if specified.

RollVariant

RaceManager.RollVariant(racestring) → string--

The rolled variant

Rolls a specified races variants by weight.

RollRaceCosmetics

RaceManager.RollRaceCosmetics(
racestring,
characterCharacter
) → {any}--

The returned cosmetics

Finds a specified races functions & calls the RollRaceCosmetics function

RollSkinColor

RaceManager.RollSkinColor(racestring) → Vector3--

The rolled color

Rolls a specified races skin color.

Show raw api
{
    "functions": [
        {
            "name": "InitCosmetics",
            "desc": "Handles the addition of character race cosmetics.\nAlso responsible for the calls of `RaceFunctions.Init`\n\nPossibly yields for `DatastoreModule.WaitForSlotData`",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [],
            "function_type": "static",
            "yields": true,
            "source": {
                "line": 143,
                "path": "global/ServerStorage/Scripts/Modules/RaceManager.luau"
            }
        },
        {
            "name": "CheckRace",
            "desc": "Checks the characters race and rolls if specified.",
            "params": [
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Character"
                },
                {
                    "name": "reroll",
                    "desc": "Forces a reroll regardless of race",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 178,
                "path": "global/ServerStorage/Scripts/Modules/RaceManager.luau"
            }
        },
        {
            "name": "RollVariant",
            "desc": "Rolls a specified races variants by weight.",
            "params": [
                {
                    "name": "race",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "The rolled variant",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 230,
                "path": "global/ServerStorage/Scripts/Modules/RaceManager.luau"
            }
        },
        {
            "name": "RollRaceCosmetics",
            "desc": "Finds a specified races functions & calls the `RollRaceCosmetics` function",
            "params": [
                {
                    "name": "race",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "character",
                    "desc": "",
                    "lua_type": "Character"
                }
            ],
            "returns": [
                {
                    "desc": "The returned cosmetics",
                    "lua_type": "{any}"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 243,
                "path": "global/ServerStorage/Scripts/Modules/RaceManager.luau"
            }
        },
        {
            "name": "RollSkinColor",
            "desc": "Rolls a specified races skin color.",
            "params": [
                {
                    "name": "race",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "The rolled color",
                    "lua_type": "Vector3"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 263,
                "path": "global/ServerStorage/Scripts/Modules/RaceManager.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "RaceManager",
    "desc": "Controls anything race related, handles cosmetics and rolling.",
    "realm": [
        "Server"
    ],
    "source": {
        "line": 7,
        "path": "global/ServerStorage/Scripts/Modules/RaceManager.luau"
    }
}