How do I disable clicking screen GUI when I click buttons on my plugin?

I am working on a plugin. It is not a widget, it is a ScreenGui parented to CoreGui. I have some buttons on it, but when I click them the background GUI’s are selected, how do I stop this?

In the gif below, I selected the TextLabel to change it’s position in the plugin, however, the background Frame is selected instead and it doesn’t let me edit my text.

In the gif below, the background frame is not visible and the plugin works fine.

Here is the code that enables the GUI.

local pluginButton = toolbar:CreateButton(
	"Easy GUI Properties", --Text that will appear below button
	"Click to open/close menu", --Text that will appear if you hover your mouse on button
	"rbxassetid://13621298264") --Button icon


local gui = script:WaitForChild("mainGUI")
local frame = gui:WaitForChild("Main")

pluginButton.Click:Connect(function()
	if gui.Parent == script then
		gui.Parent = game:WaitForChild("CoreGui")
	else
		gui.Parent = script
	end
end)

And here are the mainGUI’s properties

Any tips?

I think you need to uncheck the Active property to the background.

It is disabled, but the problem is still present.
image

Try to change plugin background to 0 not under 0 if you want to fix this issue. [Not tested]

1 Like