Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make a script where when I press a key, a gui pops up?

Please help, I can get all the help I need. Post script below.

2 answers

for making the gui visible

gui.Enabled = true

or

gui.Visible = true

Click me

This is a short answer change to what key you want This is just an example.

local player = game.Players.LocalPlayer -- The localplayer
local GUI = player:FindFirstChild("PlayerGui"):FindFirstChild("ScreenGuiName") --Change this to your gui name.
local frame = GUI:FindFirstChild("Frame")
local mouse = player:GetMouse() -- Gets the players mouse
open = false -- This is the debounce

--//main script\\--

mouse.KeyDown:connect(function(key)
              if (key == "g") then -- Change this to your key you want.
                   if (open == false) then
                         frame.Visible = true -- makes the frame visible
                         open = true -- Makes the debounce.
                    elseif (open == true) then
                         frame.Visible = false -- Makes the frame unvisible
                         open = false -- Makes the debounce.
                   end
             end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.