Advertisement
OEAgamer1

How to make a Hide UI Button in Roblox Studio

Mar 22nd, 2025
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. local UI = script.Parent.Parent.Parent
  2. local isVisible = true
  3.  
  4. script.Parent.MouseButton1Click:Connect(function()
  5.     isVisible = not isVisible
  6.     for _, child in ipairs(UI:GetChildren()) do
  7.         if child:IsA("ScreenGui") and child.Name ~= "TouchGui" and child.Name ~= "PlayerGui" then
  8.             child.Enabled = isVisible
  9.             script.Parent.Parent.Enabled = true
  10.         end
  11.     end
  12. end)
  13.  
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement