Plugin now requires script injection after parenting gui to widget

all i did was parent the UI i made to the Widget (which doesn’t even work btw) and now that appears there’s no other script. the worst part is you can’t even get rid of this unless you make a whole new plugin.

local pluginbar = plugin:CreateToolbar("Asset Priviewer")
local pluginbutton = pluginbar:CreateButton("Open widget", "Toggle", "rbxassetid://14691175406")
local windowinfo = DockWidgetPluginGuiInfo.new(
	Enum.InitialDockState.Right,
	false,
	false,
	300,
	300,
	300,
	300
)
local Window = plugin:CreateDockWidgetPluginGui("Asset Previewer", windowinfo)

Window.Title = "Asset Previewer"


local plugingui = script.Parent.UI
plugingui.Parent = Window

local Opened = false

pluginbutton.Click:Connect(function()
	Opened = not Opened
	Window.Enabled = Opened
	plugingui.MainScript.Enabled = Opened
end)

this is my explorer layout:
image
(MainScript is empty)

4 Likes