Packages
RobloxControls

RobloxControls

RobloxControls is a package that wraps around Roblox CoreGui and Core actions, in the hopes of reducing boilerplate code and improving the interaction between Roblox v Developer.

When this module is required, it will by default disable Respawning, this module implements it's own Respawn loop.

Properties

Methods

SetCoreAsync

RobloxControls:SetCoreAsync() -> promise

Wraps a :SetCore call into a promise, will attempt to keep calling :SetCore if the initial request failed.

This method is useful to combat Core actions being called, before Roblox has registered them:

SetCore: ResetButtonCallback has not been registered by the CoreScripts

	RobloxControls:SetCoreAsync("SendNotification", {
		Title = "Example Core Notification",
		Text = "Hello, World!"
	})

GetCoreAsync

RobloxControls:GetCoreAsync() -> promise

Wraps a :GetCore call into a promise, will attempt to keep calling :GetCore if the initial request failed.

This method is useful to combat Core actions being called, before Roblox has registered them:

GetCore: ResetButtonCallback has not been registered by the CoreScripts

	local isDevConsoleVisible = RobloxControls:GetCoreAsync("DevConsoleVisible"):expect()

SetRespawnCallback

RobloxControls:SetRespawnCallback() -> nil (opens in a new tab)

Set the respawn callback, this callback will be invoked when the player resets their character through the roblox Core UI.

	RobloxControls:SetRespawnCallback(function()
		print("Local-Player has tried to reset their character!")
	end)

DisableRespawning

RobloxControls:DisableRespawning() -> nil (opens in a new tab)

Convenience method for disabling respawning

	RobloxControls:DisableRespawning()

EnableRespawning

RobloxControls:EnableRespawning() -> nil (opens in a new tab)

Convenience method for enabling respawning

	RobloxControls:EnableRespawning()

SetDefaultCoreGui

RobloxControls:SetDefaultCoreGui() -> nil (opens in a new tab)

Enables a developer to specify specific Core Gui elements that will be rendered in the current place.

Any elements that are NOT passed into this function, will be disabled, and should remain disabled.

	RobloxControls:SetDefaultCoreGui(
		Enum.CoreGuiType.Chat -- the current game will ONLY support the Chat Core UI
	)

EnableCoreGui

RobloxControls:EnableCoreGui() -> nil (opens in a new tab)

Enables the CoreGui specified through the :SetDefaultCoreGui method.

	RobloxControls:EnableCoreGui()

DisableCoreGui

RobloxControls:DisableCoreGui() -> nil (opens in a new tab)

Disables the CoreGui specified through the :SetDefaultCoreGui method.

	RobloxControls:EnableCoreGui()

DisableCharacterInput

RobloxControls:DisableCharacterInput() -> nil (opens in a new tab)

Disables player-character input.

	RobloxControls:DisableCharacterInput()

EnableCharacterInput

RobloxControls:EnableCharacterInput() -> nil (opens in a new tab)

Enables player-character input.

	RobloxControls:EnableCharacterInput()

Functions