Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script that enables a BillboardGui?

Asked by 7 years ago

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)
0
Not your problem, but an easier way to switch the state of something is `itemGUI.Enabled = not itemGUI.Enabled` GoldenPhysics 474 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

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

Ad

Answer this question