So, i created a plugin but while testing some stuff i found out one of my buttons is not working so i have tried to fix that and i tried to run it outside plugin inside startergui but it seems it’s working but not in plugin
So, i clone the ui then it’s printing running but never reaches to the event or fire the event, this behaver is so weird.
Well it’s widget plugin so i save it as local plugin inside folder there is main frame which is the gui you see and the button is outside of the frame so i clone it then parent it to the main but it seems not firing when it’s cloned to the widget.
Oh ok, I’m not familiar with widgets so I can’t think of any other reasons why it isn’t firing. I guess your best option would be to wait a bit and then submit a bug report.
It’s seeming a bug you can’t just clone button then expect the script inside it to work becuase somehow it broke and never run the code at all.
i have tried to change some code whatever but now i see what’s happening, i created another testing plugin and see if the scripts runs after cloning and it seems never work at all.
Code tested:
local toolbar = plugin:CreateToolbar("Testing")
local button = toolbar:CreateButton("", "Testing", "")
local widgetInfo = DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Float, -- Widget will be initialized in floating panel
true, -- Widget will be initially enabled
false, -- Don't override the previous enabled state
1280, -- Default width of the floating window
720, -- Default height of the floating window
500, -- Minimum width of the floating window (optional)
200 -- Minimum height of the floating window (optional)
)
button.Click:Connect(function()
local Widget = plugin:CreateDockWidgetPluginGui("Testing", widgetInfo)
local Frame = script.Parent.Frame
Widget.Enabled = true
Frame.Parent = Widget
local ClonedTextButton = Frame.TextButton:Clone()
ClonedTextButton.Parent = Frame
ClonedTextButton.Visible = true
ClonedTextButton.Script.Enabled = true
end)