I am currently scripting my Roblox game and was wondering if it was possible to disable the selected / unselected on the TopBar Plus v3? For example, I just want to be able to press my TopBar button once, but it makes me do it twice because of the selection button. Here is an image:
Selected Unselected
I just want it to let me press once without having that grey hover on there. Anyone use and know how to do it? Here is my script:
local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Icon = require(ReplicatedStorage:WaitForChild("Icon")) local player = Players.LocalPlayer local musicIcon local muted = false local function toggleMusic() local music = workspace:FindFirstChild("Music") if music then muted = not muted music.Playing = not muted musicIcon:setLabel(muted and "š Music OFF" or "š Music ON") end end musicIcon = Icon.new() :setLabel("š Music ON") :bindEvent("selected", toggleMusic)
Instead of disabling the selection state in the top bar itself, why donāt you just bind it to the activated event? The activated event fires immediately when the button is pressed, bypassing the builtāin toggle that comes with the selected state.
Hello! I have changed that to " :bindEvent(āactivatedā, toggleMusic)" but then in the output, it says " 17:38:05.810 ReplicatedStorage.Icon:879: argument[1] must be a valid topbarplus icon event name! - Client - Icon:879" and doesnāt work. Here is my script if something is wrong:
local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Icon = require(ReplicatedStorage:WaitForChild("Icon")) local player = Players.LocalPlayer local musicIcon local muted = false local function toggleMusic() local music = workspace:FindFirstChild("Music") if music then muted = not muted music.Playing = not muted musicIcon:setLabel(muted and "š Music OFF" or "š Music ON") end end musicIcon = Icon.new() :setLabel("š Music ON") :bindEvent("activated", toggleMusic)
Video is too long, so hereās a simple explanation for better understanding:
Iām trying to disable the selected/unselected effect on TopBar Plus v3 in my Roblox game. Right now, I have to press my TopBar button twice instead of once because of the selection feature. Do you know how to fix this?
Unfortunately, it will not work because I used a script for the UI creation and the way TopBar Plus creators and developers has it set up, i am unable to achieve the UI information. Thatās why I need to use the script to figure out how to make it a button instead of a selection.
TopbarPlus does not expose it directly because it isnāt a standard GUI button, instead itās a script meaning that I am not able to locate the GUI within the script since they donāt release that information, they just make the TopBar.
Because there is already a system that does it for you instead of making a off-brand TopBar button, they actually use the Roblox system UI to make the TopBar.