Plugin Button Spam

Some plugins currently will create new buttons after resetting play solo (or just hitting the stop button), when they should just use the pre-existing button before going into Play Solo.

This happens more randomly, because it sometimes will create new buttons, but sometimes won’t.

[quote] Some plugins currently will create new buttons after resetting play solo (or just hitting the stop button), when they should just use the pre-existing button before going into Play Solo.

This happens more randomly, because it sometimes will create new buttons, but sometimes won’t. [/quote]

Are you using the hotswap-plugin? Just checking

Nope.

Do you have any examples for this?

Do you have any examples for this?[/quote]
It appears to do so for plugins that create the plugin buttons and such at the end of the script rather than the beginning.

Do you have any examples for this?[/quote]

https://twitter.com/TigerCaptain_/status/610503614402945024

after 10 times of exiting a place and opening the same one, this happened.

Do you have any examples for this?[/quote]

https://twitter.com/TigerCaptain_/status/610503614402945024

after 10 times of exiting a place and opening the same one, this happened.[/quote]

Thanks for the example! Anyone else have a plugin that causes this? We’ll investigate, but more examples are always good!

@FromLegoUniverse I don’t think that is the issue, because I have a joint utility plugin (for welds) that has the bug. Here’s the source code.

[code]local plugin = plugin
local toolbar = plugin:CreateToolbar(“Welding”)
local buttonManualWeld = toolbar:CreateButton(“ManualWeld”, “”, “rbxassetid://192346804”)
local buttonMotor6D = toolbar:CreateButton(“Motor6D”, “”, “rbxassetid://192351405”)
local buttonBreak = toolbar:CreateButton(“BreakJoints”, “Call :BreakJoints() on Models and BaseParts in selection9”, “rbxassetid://192346846”)

local selection = game:GetService(“Selection”)

function getAll(class, object, t)
t = t or {}
for k, child in pairs(object:GetChildren()) do
getAll(class, child, t)
end
if object:IsA(class) then
t[#t + 1] = object
end
return t
end

function join(class, partA, partB)
local joint = Instance.new(class)
joint.Part0 = partA
joint.Part1 = partB
joint.C0 = CFrame.new()
joint.C1 = partB.CFrame:inverse() * partA.CFrame
joint.Parent = partA
end

function joinAll(class, mainPart, otherParts)
for i = 1, #otherParts do
local other = otherParts[i]
if other:IsA(“BasePart”) then
join(class, mainPart, other)
end
end
if #otherParts > 2 then
print("Joined " … mainPart.Name … " to " … #otherParts … " other parts with " … class)
elseif #otherParts == 1 then
print("Joined " … mainPart.Name … " to " … otherParts[1].Name … " with " … class)
end
end

function generateOnClickJoiner(class)
return function ()
local sel = selection:Get()
local mainPart = sel[1]
local otherParts = {}
for i = 2, #sel do
otherParts[#otherParts + 1] = sel[i]
if not sel[i]:IsA(“BasePart”) then return end
end
if mainPart and mainPart:IsA(“BasePart”) and #otherParts > 0 then
joinAll(class, mainPart, otherParts)
else
print(“Select two or more BaseParts”)
end
end
end

buttonManualWeld.Click:connect(generateOnClickJoiner(“ManualWeld”))
buttonMotor6D.Click:connect(generateOnClickJoiner(“Motor6D”))
buttonBreak.Click:connect(function ()
local sel = selection:Get()
for k, object in pairs(sel) do
if object:IsA(“Model”) or object:IsA(“BasePart”) then
object:BreakJoints()
end
end
end)

– 10/15/2014 12:33 AM
[/code]

This editted version of Bloop’s triangle plugin version does it.

The above results from entering and exiting Play (F5) mode several times. I don’t have the HotSwap plugin enabled.

RibbonBar doesn’t deal with extra buttons well at all. It should all hide nicely behind a little >> button like most UIs do when they have too many buttons.

[quote]

The above results from entering and exiting Play (F5) mode several times. I don’t have the HotSwap plugin enabled.

RibbonBar doesn’t deal with extra buttons well at all. It should all hide nicely behind a little >> button like most UIs do when they have too many buttons. [/quote]

Found this in my output if it helps.

15:56:24.228 - Plugin attempting to show toolbar that does not exist - 134 15:56:24.273 - Plugin attempting to show toolbar that does not exist - 134 15:56:24.290 - Plugin attempting to show toolbar that does not exist - 134 15:56:24.294 - Plugin attempting to show toolbar that does not exist - 134