I am trying to make a plugin, and I am trying to learn it from Documentation, but I barely understand it and it doesnt work…
local toolbar = plugin:CreateToolbar("Timer")
local button = toolbar:CreateButton("Timer", "Shows Timer...", "rbxassetid://14778619221")
-- Create new 'DockWidgetPluginGuiInfo' object
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
450, -- Default width of the floating window
300, -- Default height of the floating window
200, -- Minimum width of the floating window (optional)
150 -- Minimum height of the floating window (optional)
)
-- Create new widget GUI
local testWidget = plugin:CreateDockWidgetPluginGui("Timer", widgetInfo)
script.Parent.Parent = testWidget
button.Click:Connect(function()
testWidget.Enabled = true
end)