Plugin UI not showing up?

I am not sure why the UI I made for my plugin is not showing even though I parented it to the widget…

local ToolBar = plugin:CreateToolbar("SimpleScript")
local SimpleButton = ToolBar:CreateButton("SimpleScipt", "Insert Script Interface", "")

local Status = false

local PluginInfo = DockWidgetPluginGuiInfo.new(
	Enum.InitialDockState.Left,
	false,
	false,
	240,
	228,
	100,
	100
)

local Widget = plugin:CreateDockWidgetPluginGui("SimpleScript", PluginInfo)
Widget.Title = "SimpleScript"

local SimpleScriptUI = script.Parent:FindFirstChild("UI")
SimpleScriptUI.Parent = Widget

function Triggered()
	if Status then 
		Widget.Enabled = false
		Status = false
	else
		Widget.Enabled = true
		Status = true
	end
end

SimpleButton.Click:Connect(Triggered)

Try this.

local SimpleScriptUI = script.Parent.UI
SimpleScriptUI.Parent = Widget

I just tried that and it still doesn’t work.

1 Like

“UI” is a frame, right?
“UI” is a frame, right?

It somehow works now, I have no clue what I did, but do you know how I should fix this UI?

https://gyazo.com/afe45eb80684e2ae4b788e8c48456824

1 Like

Background: Size: 1,0, 1,0

I recommend you to use UITableLayout

1 Like