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

GUI popup only 1 time when I close it, any help?

Hello, I am trying to show and then hide a GUI when a variable is a certain amount, when it close the first time then the GUI doesnt reappear anymore. Any help?

2 comments

0

Can you include your script?

0

Done

1 answer

Enable:

local tool = script.Parent
local player = script.Parent.Parent.Parent
local player2 = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent)

tool.Activated:Connect(function()
	player.PlayerGui.PCGui.PCBackpackFull.Visible = true
end)

Disable:

local db = true
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
	if db == true then
		db = false
		player.PlayerGui.PCGui.PCBackpackFull.Visible = false
		wait(1)
		db = true
	end
end)

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