Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can i?

Asked by
Subbix -5
10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local Plyr = game:GetService("Players")

function onKey(key)
    if key == "q" then
        a=Game.Lighting:FindFirstChild("Shop")
    end
end
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?

1 answer

Log in to vote
0
Answered by
ZeroBits 142
10 years ago

add this after a is defined. oh, and

please make your question title relevant to your question content. it says it in plain text.


b=player.PlayerGui:FindFirstChild("Shop") if b~=nil then b:Destroy() else a:Clone().Parent=player.PlayerGui end
Ad

Answer this question