I was having some issues with my plugin, so after adding in a couple debug print messages into the plugin, I found this in the output:
Deactivated
Here’s the basic rundown of how the plugin works: You click the button, and it activates the plugin – it shouldn’t be getting deactivated:
local plugin = plugin
local toolbar = plugin:CreateToolbar("Build")
local mouse,activeTool
local toolbarButtons = {
select = toolbar:CreateButton(
"Select_BUILD",
"Select an object",
"rbxassetid://248473961"
);
}
plugin.Deactivation:connect(function()
print("Deactivated")
end)
toolbarButtons.select.Click:connect(function()
plugin:Activate(true)
end)
The only explanation is that plugin.Deactivation is getting fired when plugin:Activate(true) is executed – that should not be happening at all. Please fix.