May I ask why my plugin doesn’t work, doesn’t even show the frame
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local Toolbar = plugin:CreateToolbar("Script Maker")
local MakerButton = Toolbar:CreateButton("Script", "Create Script from Textbox", "rbxassetid://4370186570", "Script")
local Open = false
local MakerWidgetInfo = DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Left,
false,
false,
200,
300,
150,
150
)
local MakerWidget = plugin:CreateDockWidgetGui("Create Script", MakerWidgetInfo)
MakerWidget.Title = "Script Maker"
local gui = script.Parent.ScriptMaker
gui.Parent = MakerWidget
local input = gui.Input
local frame = gui.Create
local button = frame.CreateButton
button.MouseButton1Click:Connect(function()
local ServerScriptService = game:GetService("ServerScriptService")
local Old = ServerScriptService:FindFirstChildWhichIsA("Script")
local newScript = Instance.new("Script")
newScript.Source = input.Text
newScript.Parent = ServerScriptService
newScript.Name = "Script Maker"
ChangeHistoryService:SetWaypoint("Added new custom script")
end)
MakerButton.Click:Connect(function()
if Open then
MakerWidget.Enabled = false
Open = false
else
MakerWidget.Enabled = true
Open = true
end
end)
I get reference thanks to Youtube Codes Otaku
His script is
local Toolbar = plugin:CreateToolbar("Tutorial Suite")
local NotesButton = Toolbar:CreateButton("Notes", "Type some notes", "rbxassetid://4370186570", "Notes")
local Opened = false
local NotesWidgetInfo = DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Left,
false, -- Widget will be initially enabled
false, -- Don't override the previous enabled state
200, -- Default width of the floating window
300, -- Default height of the floating window
150, -- Minimum width of the floating window (optional)
150 -- Minimum height of the floating window (optional)
)
local NotesWidget = plugin:CreateDockWidgetPluginGui("Notes", NotesWidgetInfo)
NotesWidget.Title = "My Notes"
local NotesGui = script.Parent.NotesGui
NotesGui.Parent = NotesWidget
local NotesGuiToolbar = NotesGui.Toolbar
local NotesZoomInButton = NotesGuiToolbar.ZoomIn
local NotesZoomOutButton = NotesGuiToolbar.ZoomOut
local NotesTextBox = NotesGui.TextBox
NotesZoomInButton.MouseButton1Click:Connect(function()
NotesTextBox.TextSize = NotesTextBox.TextSize + 4
end)
NotesZoomOutButton.MouseButton1Click:Connect(function()
NotesTextBox.TextSize = NotesTextBox.TextSize - 4
end)
NotesButton.Click:Connect(function()
if Opened then
NotesWidget.Enabled = false
Opened = false
else
NotesWidget.Enabled = true
Opened = true
end
end)
And it’s working, do you guys know why mine doesn’t work?