[TOPBAR PLUS] How do I delete specific topbar icons?

I need to delete specific topbar+ icons under specific circumstances.

For example, I have 2 characters in my game: Zatanna and Freya

When you spawn as Zatanna, a topbar icon is created called “Toggles” which has 2 outfit toggles for her, and the same thing for Freya.

However, when I spawn as Freya after being Zatanna, or vice versa, the topbar for the other character stays as well as the new one being created.

I want to know if there’s any way to delete a specific topbar icon.

When creating the new Topbar Icon, you create it as an variable. When a player changes character you detect it and use :Destroy().

Here is an example on how to use the :Destroy():

local Topbar = require(game:GetService("ReplicatedStorage").Modules.Icon)

local Icon = Topbar.new()
Icon:setLabel("TestLabel")
task.wait(3)
Icon:Destroy()