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

Why doesn't my gui re-open when I click on it again?

I have just made a script that when I click on an object a gui pops up. I can open it once and then close it but after I close it that first time it doesn't let me open it again. My opening code is

local gui = script.Gui local brickClickedEvent = game.ReplicatedStorage.Events.BrickClicked

brickClickedEvent.OnClientEvent:Connect(function() gui.Enabled = true

end)

My button close script is

function close() script.Parent.Parent.Visible = false end

script.Parent.MouseButton1Click:connect(close)

What should I do to fix this?

1 comment

0

When you click on a ClickDetector or a Signal like "Part.Touched:Connect"

1 answer

You're switching between the usage of Enabled and Visible, you have to use one out of the two, don't combine them.

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