So I have recently started using TopbarPlus v2.9.1 but I received some bug when I tried to make two buttons.
The reset button works perfectly fine but Its also works on other buttons after I died(It happens only one time)
The code I use:
local iconModule = game:GetService("ReplicatedStorage").Icon
local Icon = require(iconModule)
local invite = Icon.new()
:setLabel("test")
local reset = Icon.new()
:setLabel("reset")
function death(chr)
game:GetService("ReplicatedStorage").Reset:Fire()
end
reset.selected:Connect(function()
death()
end)
reset.deselected:Connect(function()
death()
end)
You are detecting if the reset button is being deselected too, which means if you click another button it fires the death too. Simply remove the reset.deselected connection and it should be fixed.