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

How do I make Billboardgui Disappear?

I want it to either be destroyed or 1 transparency, but I don't know how so, all I know was doing it on the parts.

3 answers

Well it depends on whether you have the script in the surfacegui or in a textlabel/button inside the surfacegui. But either way, you would use destroy. Like so:

script.Parent.Parent:Destroy()

1 comment

0

Welp, beat me to it for the fastest answer but at least mine has two answers.

Use this method :Destroy(), it destroys whatever you want to set to nil.

If you instead want to keep it for later instead of destroying it. You can set it to invisible.

.Visible = false

and then set it back again.

.Visible = true

2 comments

1

Don't use remove. It's deprecated.

1

Remove does not work the same. Destroy moves the object to nil, prepares it for garbage collection and calls Destroy on it's children. Remove parents it to nil and calls Remove on it's children, but does not prepare garbage collection.

The easiest way to make your BillboardGui to dissapear would be either to put your contents within a Frame, and set the Frame property Visible to false:

script.Parent.BillboardGui.Frame.Visible = false

Or, you could use the Enabled property:

script.Parent.BillboardGui.Enabled = false --disable it
script.Parent.BillboardGui.Enabled = true --enable it

Or you could just use the Destroy event.

script.Parent.BillboardGui:Destroy()

If this helped, please upvote and accept my answer!

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