Ad
Log in to vote
0

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

Asked by 4 days ago
Edited 4 days 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 — 3d
0
and try :Destroy() on it? abus_r 0 — 3d

1 answer

Log in to vote
0
Answered by 3 days 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