How can I make a plugin menu?

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 =
	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
	testWidget.Enabled = true

looking at the code, i realised that you forgor the function to enable the DockWidgetPluginGui yet

widgetInfo.Enabled = not widgetInfo.Enabled
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.