Hey would anyone be able to help me with a gui as I would like it to show a gui when a user has pressed "q" And not sure how is anyone able to help?
Hello, I'm xWhiteHat. I'll be trying to help you with your request. I've made this script that should work how you asked.
01 | local FramePath -- Path to frame |
02 | local UIS = game:GetService( "UserInputService" ) |
03 |
04 | UIS.InputBegan:Connect( function (input, GPE) |
05 | if not GPE then |
06 | if input.KeyCode = = Enum.KeyCode.Q then |
07 | if FramePath.Visible = = false then |
08 | FramePath.Visible = true |
09 | elseif FramePath.Visible = = true then |
10 | FramePath.Visible = false |
11 | end |
12 | end |
13 | end |
14 | end ) |
I hope this script works im not really that good
1 | Mouse = game.Players.localPlayer:GetMouse() |
2 | Mouse.KeyDown:connect( function (key) |
3 | if (key:byte() = = 113 ) then |
4 | game.StarterGui.(PutGuiNameHere).Enabled = true |
5 | Mouse.KeyUp:connect( function (key) |
6 | if (key:byte() = = 113 ) then |
7 | game.StarterGui.(PutGuiNameHere).Enabled = false |