Cloning break scripts plugin

So, i created a plugin but while testing some stuff i found out one of my buttons is not working so i have tried to fix that and i tried to run it outside plugin inside startergui but it seems it’s working but not in plugin

So, i clone the ui then it’s printing running but never reaches to the event or fire the event, this behaver is so weird.


it prints something when it’s inside startergui

image
Now for the plugin it prints running as expected


But when i press the “+” add button it doesn’t print “something” at all
image

code:

print("Running")
script.Parent.MouseButton1Up:Connect(function()
	print("Something")
end)

Cloning side

local NewElment = ExtraThingsFolder.Child:Clone()
	NewElment.Parent = GuiLayout
	NewElment.Visible = true
	NewElment.Name = Child.Name 
	NewElment.Title.Text = Child.Name

Could you help me pleaseeeeee i am dying.

1 Like

Roblox is this bug? idk if nobody replied or i fix it, i will just make report ticket.

1 Like

Did you try using .MouseClick or .Activated yet? If those don’t work, then it might be a Roblox bug.

Also, I think I remember something about how you can only use .Activated in plugins but I think that was for something else.

I had have tried that, but it seems not working i think we got bug there.
it did print running but didn’t fire the event when i click that.


image

I think you already said this at the top of your post but is the GUI in CoreGui? All plugin Guis have to be there.

Well it’s widget plugin so i save it as local plugin inside folder there is main frame which is the gui you see and the button is outside of the frame so i clone it then parent it to the main but it seems not firing when it’s cloned to the widget.
image
image

Oh ok, I’m not familiar with widgets so I can’t think of any other reasons why it isn’t firing. I guess your best option would be to wait a bit and then submit a bug report.

Have you tried using .Activated instead of .MouseButton1Up?

Have you tried using MouseButton1Click?

script.Parent.MouseButton1Click:Connect(function()
	--Code Here
end)

It’s seeming a bug you can’t just clone button then expect the script inside it to work becuase somehow it broke and never run the code at all.

i have tried to change some code whatever but now i see what’s happening, i created another testing plugin and see if the scripts runs after cloning and it seems never work at all.

Code tested:

local toolbar = plugin:CreateToolbar("Testing")
local button = toolbar:CreateButton("", "Testing", "")

local widgetInfo = DockWidgetPluginGuiInfo.new(
	Enum.InitialDockState.Float, -- Widget will be initialized in floating panel
	true, -- Widget will be initially enabled
	false, -- Don't override the previous enabled state
	1280, -- Default width of the floating window
	720, -- Default height of the floating window
	500, -- Minimum width of the floating window (optional)
	200 -- Minimum height of the floating window (optional)
)

button.Click:Connect(function()
	local Widget = plugin:CreateDockWidgetPluginGui("Testing", widgetInfo)
	local Frame = script.Parent.Frame
	Widget.Enabled = true
	Frame.Parent = Widget

	local ClonedTextButton = Frame.TextButton:Clone()
	ClonedTextButton.Parent = Frame
	ClonedTextButton.Visible = true
	ClonedTextButton.Script.Enabled = true
end)

The code inside the textbutton:

print("Running")
script.Parent.Activated:Connect(function()
	print("Pressed")
end)

it didn’t print or even do something so i will just make report bug.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.