Skip to content
InstancesOverviewNew · 0.744

protectgui

Describe local protection management for an interface object.

Aliasesprotect_gui

Details#

Registers a UI object with the module's local protected-UI handling. Use the same object with unprotectgui for cleanup. This is presentation/lifecycle behavior, not server authorization.

Examples#

Example

Luau
local gui = Instance.new("ScreenGui")
protectgui(gui)
print(isprotected(gui))
unprotectgui(gui)
gui:Destroy()