[HELP!] How Do I Make TopBarPlus Buttons Independent?

How do you make an already selected button not deselect if you clicked on another button?

I want “Mute Music” to remain selected even if I select other buttons. (basically to just be independent from other buttons)

Looks like TopBarPlus buttons don’t support this behavior by default, so you need to handle it programmatically.

You can store the state of each button and add a handler that toggles the clicked button while preserving the state of the others.

local TopbarPlus = require(game:GetService("ReplicatedStorage").TopbarPlus)

-- Create buttons
local muteButton = TopbarPlus.new():setText("Muted")
local buttonA = TopbarPlus.new():setText("Button A")
local buttonB = TopbarPlus.new():setText("Button B")

-- Track active states
local buttonStates = {
    [muteButton] = false,
    [buttonA] = false,
    [buttonB] = false,
}

-- Generic toggle logic for any button
local function bindToggle(button)
    button:BindEvent("Activated", function()
        buttonStates[button] = not buttonStates[button]
        button:SetActive(buttonStates[button])
    end)
end

bindToggle(muteButton)
bindToggle(buttonA)
bindToggle(buttonB)

Please let me know if that works.


I advise you to read the documentation. You need to use :autoDeselect(false) on your icon.

Thanks for helping, I tried using this but it didn’t work quite well

Thank you, I was looking for something like this