Skip to main content

ThreadInitializationInformation

Type

Contains information to initialize the execution of a new luau thread.

Properties

thread

ThreadInitializationInformation.thread: thread?

The parent thread. If nil, the caller is assumed to be the parent.

script

ThreadInitializationInformation.script: LocalScript | Script | ModuleScript

The script global for the thread. This will not modify the thread's RobloxExtraSpace/userdata field.

identity

ThreadInitializationInformation.identity: number

The identity of the thread (execution context), if nil, the parents execution context is used.

WARNING

This value must be between 0 and 8, else the parent execution context is used.

env

ThreadInitializationInformation.env: {[any]any} | nil

The environment of the thread, if nil, a sandboxed version of the parent's environment is used.

Show raw api
{
    "functions": [],
    "properties": [
        {
            "name": "thread",
            "desc": "The parent thread. If nil, the caller is assumed to be the parent.",
            "lua_type": "thread?",
            "source": {
                "line": 14,
                "path": "impl/Types/ThreadInitializationInformation.luau"
            }
        },
        {
            "name": "script",
            "desc": "The script global for the thread. This will __not__ modify the thread's RobloxExtraSpace/userdata field. ",
            "lua_type": "LocalScript | Script | ModuleScript",
            "source": {
                "line": 22,
                "path": "impl/Types/ThreadInitializationInformation.luau"
            }
        },
        {
            "name": "identity",
            "desc": "The identity of the thread (execution context), if nil, the parents execution context is used.\n\n:::warning\nThis value must be between 0 and 8, else the parent execution context is used.\n:::",
            "lua_type": "number",
            "source": {
                "line": 34,
                "path": "impl/Types/ThreadInitializationInformation.luau"
            }
        },
        {
            "name": "env",
            "desc": "The environment of the thread, if nil, a sandboxed version of the parent's environment is used.",
            "lua_type": "{ [any]: any } | nil",
            "source": {
                "line": 42,
                "path": "impl/Types/ThreadInitializationInformation.luau"
            }
        }
    ],
    "types": [],
    "name": "ThreadInitializationInformation",
    "desc": "Contains information to initialize the execution of a new luau thread.",
    "tags": [
        "Type"
    ],
    "source": {
        "line": 6,
        "path": "impl/Types/ThreadInitializationInformation.luau"
    }
}