01 | local player = game.Players.LocalPlayer |
02 | local mouse = player:GetMouse() |
03 | local Plyr = game:GetService( "Players" ) |
04 |
05 | function onKey(key) |
06 | if key = = "q" then |
07 | a = Game.Lighting:FindFirstChild( "Shop" ) |
08 | end |
09 | end |
10 | mouse.KeyDown:connect(onKey) |
How can i make the above everytime i click q it will appear it then dissapear it when i click q again?
add this after a is defined. oh, and
please make your question title relevant to your question content. it says it in plain text.
1 | b = player.PlayerGui:FindFirstChild( "Shop" ) |
2 | if b~ = nil then |
3 | b:Destroy() |
4 | else |
5 | a:Clone().Parent = player.PlayerGui |
6 | end |