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

How can I make a billboard GUI in a part disappear when the part disappears?

Asked by 2 years ago
Edited 2 years ago

Title says it all.

I'm trying to make good-looking text above a button (part) using billboard GUI, but whenever you walk over the button (to buy something), the text just ends up staying there even after the button disappears. How can I fix it?

Thanks.

0
Maybe you can try locating the Billboard Gui itself? abus_r 0 — 2y
0
and try :Destroy() on it? abus_r 0 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago
local part=script.Parent
local gui=part:FindFirstChildOfClass"BillboardGui"

part:GetPropertyChangedSignal"Transparency":Connect(function()
    if part.Transparency==1 then
        gui.Enabled=false
    end
end)
Ad

Answer this question