Trying to :Destroy() a PluginToolbarButton does absolutely nothing
I should note that PluginToolbar:Destroy() also does nothing.
- creating disposable PluginToolbarButtons and PluginToolbar
(showing buttons and are useless at the time is terrible UX)
I’m aware of DockWidgetPluginGui however this is easier to use and some prefer to keep their viewport clean.
local toolbar = plugin:CreateToolbar("Toolbar") local Button = toolbar:CreateButton("Button","","") Button.Click:Connect(function() Button.Parent = nil Button:Destroy() warn("Button:Destroy()") end)
plugin.lua (190 Bytes)