Skip to main content

hide ui

toggles all screen guis on/off.

overview

the hide ui feature toggles all enabled screen guis in playergui, giving you a clean, ui-free view for recording.

how it works

on enable

  1. scans playergui for all children
  2. checks each if it's a screengui
  3. if enabled, adds to tracking table
  4. disables the gui
for _, gui in ipairs(playerGui:GetChildren()) do
if gui:IsA("ScreenGui") and gui.Enabled then
activeGUIs[gui] = true
gui.Enabled = false
end
end

tracking system

activeGUIs table stores which guis were hidden:

  • only tracks guis that were enabled when toggled
  • prevents re-enabling guis that were already disabled
  • used for restoration on disable

screengui only

only affects screengui instances:

  • doesn't touch billboardguis
  • doesn't touch surfaceguis
  • only screen-space ui

on disable

when disabled:

  1. loops through activeGUIs table
  2. checks gui still exists (parent check)
  3. re-enables each gui
  4. clears the table
for gui in pairs(activeGUIs) do
if gui and gui.Parent then
gui.Enabled = true
end
end
activeGUIs = {}

use cases

clean gameplay recording

record without any ui elements.

screenshot sessions

capture clean frames of the game.

cinematic shots

create immersive footage without ui.

before/after comparisons

quickly toggle ui to compare views.

limitations

lcs notifications not affected

lcs's own notification gui is created separately and won't be hidden by this feature.

core guis separate

roblox core guis (health, backpack, etc) are hidden by the freecam feature, not this one.

new guis after enable

guis created after lcs is enabled won't be automatically hidden. you'd need to:

  • toggle lcs off and on
  • or implement a childadded listener

technical details

why track enabled state?

some guis might already be disabled:

  • loading screens
  • hidden menus
  • conditional ui

we only want to restore guis that we disabled.

table as set

activeGUIs uses table as set:

activeGUIs[gui] = true  -- add to set
for gui in pairs(activeGUIs) -- iterate set

this is more efficient than an array for this use case.

parent check

before re-enabling, check parent:

if gui and gui.Parent then

guis might be destroyed while lcs is active. this prevents errors.

source code

location: features/hideUI.lua

simple module (~30 lines):

  • activeGUIs tracking table
  • enable function (hide + track)
  • disable function (restore + clear)

customization

whitelist certain guis

don't hide specific guis:

local whitelist = {"ImportantUI", "KeepThisVisible"}

for _, gui in ipairs(playerGui:GetChildren()) do
if gui:IsA("ScreenGui") and gui.Enabled then
if not table.find(whitelist, gui.Name) then
activeGUIs[gui] = true
gui.Enabled = false
end
end
end

auto-hide new guis

add event listener:

local connection = playerGui.ChildAdded:Connect(function(gui)
if gui:IsA("ScreenGui") and gui.Enabled then
activeGUIs[gui] = true
gui.Enabled = false
end
end)

-- store connection for cleanup on disable

troubleshooting

some ui still showing

  • might be billboardguis (use hide billboards feature)
  • might be core guis (hidden by freecam)
  • might be surfaceguis (not affected by this feature)

ui not restoring

  • check console for errors
  • guis might have been destroyed
  • try toggling lcs again

important ui disappeared

  • some ui is critical for gameplay
  • toggle lcs off to restore
  • consider whitelisting important guis