Hey there. I am trying to create a script that goes into a brick and when the brick is clicked, a billboard gui is enabled. I have been working for hours to get the script to work but my attempts haven't been successful. What is wrong with the script?
itemGUI = script.Parent.BillboardGui
function showItems()
if itemGUI.Enabled == false then
itemGUI.Enabled = true
else
itemGUI.Enabled = false
end
end
itemGUI.ClickDetector.MouseClick:connect(showItems)

1 comment
Not your problem, but an easier way to switch the state of something is
itemGUI.Enabled = not itemGUI.Enabled