gethui
Returns a container for your UI that game scripts cannot enumerate, keeping your interface hidden from anti-cheat sweeps of CoreGui.
Signature
gethui(): InstanceReturns
Instance
Example
local gui = Instance.new("ScreenGui")
gui.Name = "Overlay"
gui.Parent = gethui()
-- the game's own scripts cannot find it under PlayerGui
print(game.Players.LocalPlayer.PlayerGui:FindFirstChild("Overlay")) --> nil