Hi, I want to make a script with them I can open / close a gui with the key q. That´s what I have but I doesn´t work.
-- Variables --
Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
GUI = game.StarterGui.Handbook.StartMenue
Box = GUI.GameFrame
Open = false
-- Function --
´function PressQ(key)
´ if (key == "q") then
´ if (Open ==false) then
Box.Visible = true
Open = true
elseif (Open == true) then
Box.Visible = false
Open = false
end
end
end
Mouse.Keydown:conncect(PressQ)

1 comment
You should be using the UserInputService, not KeyDown.