I’m making plugin which will help me with a lot of stuff. I need to disable RibbonTools when I’m using my function from plugin. But for some reason when I’m disabling RibbonTools my PluginMouse.Move connection terminates.
The code that I wrote:
PluginMouse.Move:Connect(function()
print("mouse moving")
end)
pluginButton.Click:Connect(function()
enabled = not enabled
if enabled then
previousRibbonTool = plugin:GetSelectedRibbonTool()
print(previousRibbonTool)
if previousRibbonTool == Enum.RibbonTool.None then
plugin:SelectRibbonTool(Enum.RibbonTool.None, zeroRibbonToolPosition)
end
else
local currentRibbonTool = plugin:GetSelectedRibbonTool()
if currentRibbonTool ~= previousRibbonTool then
plugin:SelectRibbonTool(previousRibbonTool, zeroRibbonToolPosition)
end
end
end)