-LocalScript repeat wait() until game.Players.LocalPlayer local p = game.Players.LocalPlayer local m = p:GetMouse() local folder = p.PlayerGui:WaitForChild("GUINAME") local guitoopen = folder["Directoryhere"] -- What does this mean? m.KeyDown:connect(function(key) if key:lower() == "x" then if guitoopen.Visible then guitoopen.Visible = false else guitoopen.Visible = true end end end)
Hello, thank you for reading. I needed a GUI where it'll open if you press a certain Key, which is "x". I found this in the history of ScriptingHelpers, but I was wondering what "Directoryhere" meant. If anyone can explain to me, I would be so grateful!
First of all you should not be asking help with scripts that you did not write yourself.
The script is asking for the name of the gui that you would like to open.
So if this is your gui:
You would fill the variables in as so:
local folder = p.PlayerGui:WaitForChild("ScreenGui33") local guitoopen = folder["TextBox77"] -- What does this mean?