Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can i?

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.