I need help on this script i tried everything and can't find the problem, I'm trying to make it were you click "G" and a frame will pop up like a backpack gui please help and thanks
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() Mouse.KeyDown:connect(function(Key) if Key:lower() == "g" then if script.Parent.MainFrame.Visible == false then -- if the location's visible property is true then script.Parent.MainFrame.Visible = true -- DO this else -- Otherwise, script.Parent.MainFrame.Visible = false -- Do this end -- That's all end end)
Your problem was the script was on one line and not getting through. I fixed this for you and it should work now.
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() Mouse.KeyDown:connect(function(Key) if Key:lower() == "g" then if game.StarterGui["Grief Backpack gui"].MainFrame.Visible == false then -- if the location's visible property is true then game.StarterGui["Grief Backpack gui"].MainFrame.Visible = true -- DO this else -- Otherwise, game.StarterGui["Grief Backpack gui"].MainFrame.Visible = false -- Do this end -- That's all end end)