Help making a Plugin

Hey there! I’m trying to make a simple plugin for designing UI. This is my first time making a plugin, and I’ve run into a hurdle that I just can’t figure out.


I made this UI for my plugin.

However, when I open my plugin, it looks like this:

The TextButtons and TextLabels, just disappear.

This is my code:

local ToolBar = plugin:CreateToolbar("UI Design")
local UIButton = ToolBar:CreateButton("UI Design", "Spice up your UI", "rbxassetid://4458901886")
local UIWidgetInfo = DockWidgetPluginGuiInfo.new(
	Enum.InitialDockState.Left,
	false,
	false,
	200,
	300,
	150,
	150
)

local UIWidget = plugin:CreateDockWidgetPluginGui("UI Design", UIWidgetInfo)
UIWidget.Title = "UI Design"
script.Parent.Panel:Clone().Parent = UIWidget

UIButton.Click:Connect(function()
	UIWidget.Enabled = not UIWidget.Enabled
	
	UIWidget.Panel.Background.Frame1.TextButton.MouseButton1Click:Connect(function()
		print("Hello")
	end)
end)

As you can see, I added a print statement to detect when the button is clicked, and it does print “Hello”.

Any help is appreciated! Thanks!

1 Like

Are you using scale for position and size?

Yep, I’m using scale for position and size.

Try using offset instead of scale.

Let me try using offset. Thanks for responding!

Should I be using offset for both position and scale?

Stop what ur doing, I totally saw this over my head, but why are you cloning the frame instead of using the frame?

Make the position offset, but make size to scale .
Worked for me with widgets

Yeah, I’m cloning it into the widget.

Is panel the ScreenGUI or the frame?

It’s a frame.

Don’t ignore me, make position offset and size scale

Let me try that out. Thanks for responding!

If you make it screengui it will error (in my experience atleast)


That makes it all weird.

maybe you didn’t read carefully, read again

That won’t work. I did that at the beginning, but unfortunately it didn’t work.

Yep I made the position offset, but the size scale, and it didn’t work.

Did you try not cloning it and using panel as-is?

Haha, totally didn’t steal the UI I made for you Thanks for responding anyway lol.

1 Like