Skip to main content

CoreGuiUtils

Utility functions to work with the CoreGui

Functions

promiseRetrySetCore

CoreGuiUtils.promiseRetrySetCore(
triesnumber,
initialWaitTimenumber,
...any--

parameters to set core with

) → Promise<()>

Retries setting the the core. This is required because sometimes the Core scripts are not initialized by the time that client code executes.

tryToSetCore

CoreGuiUtils.tryToSetCore(
...any--

Args to try to call SetCore with

) → (
boolean,--

false if failed

string?--

error, if there was one

)

Tries to invoke StarterGui:SetCore with the arguments specified

Show raw api
{
    "functions": [
        {
            "name": "promiseRetrySetCore",
            "desc": "Retries setting the the core. This is required because sometimes the Core\nscripts are not initialized by the time that client code executes.",
            "params": [
                {
                    "name": "tries",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "initialWaitTime",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "...",
                    "desc": "parameters to set core with",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<()>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 23,
                "path": "src/coreguiutils/src/Client/CoreGuiUtils.lua"
            }
        },
        {
            "name": "tryToSetCore",
            "desc": "Tries to invoke `StarterGui:SetCore` with the arguments specified",
            "params": [
                {
                    "name": "...",
                    "desc": "Args to try to call SetCore with",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "false if failed",
                    "lua_type": "boolean"
                },
                {
                    "desc": "error, if there was one",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 58,
                "path": "src/coreguiutils/src/Client/CoreGuiUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "CoreGuiUtils",
    "desc": "Utility functions to work with the CoreGui",
    "source": {
        "line": 5,
        "path": "src/coreguiutils/src/Client/CoreGuiUtils.lua"
    }
}