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

Script that enables a BillboardGui?

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

0

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

1 answer

✓ Accepted answer

If it ever does not shows the gui, try itemGUI.Adornee = itemGUI.Parent

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