Skip to main content

ScreenGuiService

This item only works when running on the client. Client

Centralized provider so Hoarcekat stories can bootstrap in a fake PlayerGui

Functions

Init

ScreenGuiService:Init(serviceBagServiceBag) → ()

Initializes the ScreenGuiService

GetGuiParent

ScreenGuiService:GetGuiParent() → ()

Gets the current player gui to use

return ScreenGui?

SetGuiParent

ScreenGuiService:SetGuiParent(playerGuiPlayerGui | Instance) → ()

Sets the current playerGui to use

return MaidTask

ObservePlayerGui

ScreenGuiService:ObservePlayerGui() → ()

Observes the player gui to parent stuff into

return Observable<ScreenGui?>

Destroy

ScreenGuiService:Destroy() → ()

Cleans up the ScreenGuiService

Show raw api
{
    "functions": [
        {
            "name": "Init",
            "desc": "Initializes the ScreenGuiService",
            "params": [
                {
                    "name": "serviceBag",
                    "desc": "",
                    "lua_type": "ServiceBag"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 24,
                "path": "src/genericscreenguiprovider/src/Client/ScreenGuiService.lua"
            }
        },
        {
            "name": "GetGuiParent",
            "desc": "Gets the current player gui to use\n\nreturn ScreenGui?",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 36,
                "path": "src/genericscreenguiprovider/src/Client/ScreenGuiService.lua"
            }
        },
        {
            "name": "SetGuiParent",
            "desc": "Sets the current playerGui to use\n\nreturn MaidTask",
            "params": [
                {
                    "name": "playerGui",
                    "desc": "",
                    "lua_type": "PlayerGui | Instance"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 48,
                "path": "src/genericscreenguiprovider/src/Client/ScreenGuiService.lua"
            }
        },
        {
            "name": "ObservePlayerGui",
            "desc": "Observes the player gui to parent stuff into\n\nreturn Observable<ScreenGui?>",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 65,
                "path": "src/genericscreenguiprovider/src/Client/ScreenGuiService.lua"
            }
        },
        {
            "name": "Destroy",
            "desc": "Cleans up the ScreenGuiService",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 92,
                "path": "src/genericscreenguiprovider/src/Client/ScreenGuiService.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "ScreenGuiService",
    "desc": "Centralized provider so Hoarcekat stories can bootstrap in a fake PlayerGui",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 7,
        "path": "src/genericscreenguiprovider/src/Client/ScreenGuiService.lua"
    }
}