Hi guys! Any ideas why this isn't working? (It is not opening the gui) thanks :)
Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
gui = script.Parent.Menu.Frame
Open = false
function PressM(key)
if (key == "m") then
if (Open == false) then
gui.Visible = true
Open = true
elseif Open == true then
gui.Visible = false
Open = false
end
end
end
Mouse.KeyDown:connect(PressM)
It is a localscript in the startergui!

1 comment
I have edited my answer and it should work. I think the error was because you were checking the key again.