[v3!] TopbarPlus v3.0.0 | Construct intuitive topbar icons; customise them with themes, dropdowns, captions, labels and much more

For some reason, the module doubles the amount of buttons you create.

What I mean is, when you create a button, it adds another completely identical one.

Here’s my script:

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

local OurIcon = Icon.new()
OurIcon:setLabel("abracadabra")

Am I doing something wrong?

1 Like

Is the script placed in StarterCharacterScripts?

How do you change the button offsets in TPB? I mean the distance from the left or right, and the distance between icons. Anyone know how to do that?

edit: figured it out

Ok I just updated your updated TopBarPlus to make it change when you open the menu.

(I made the OG theme, @sqarv turned it into an updated module fixing a big issue, then I updated that to support the new right menu)

2 Likes

Quick question, can you update your module so it supports GetImageForKeycode when in Controller Mode?

1 Like

I don’t even know what that is… sorry!

Its basically a function in UserInputService that returns a image corresponding to a button: UserInputService | Documentation - Roblox Creator Hub
This is one of Roblox’s recommended ways of getting dualshock/dualsense buttons

1 Like

Oh epic! I’ll try that tomorrow, but I’ll need to find where it generates buttons.

1 Like

Its in IconController and all lines with “rbxassetid://” are the important ones

1 Like

Finally got a chance to add this, I’m gonna update Studio and start working on this. Thanks for the tip!

Edit: how do u test the button images i cant get button icons to show even before editing anything

Ok, I updated it, does it work now? (I literally cannot test it)

edit: i also added selection in the style of the left menu button

1 Like

yeah it works now thanks
Screenshot_20231012_160543

1 Like

Hmph its been 29 days i think now but
for anyone (specifically you too) wondering how you can make deselected buttons on select its pretty easy

icon.selected:Connect(function()
    -- code
    icon:deselect()
end)

also, with this, you can do it like this:

drop:setDropdown({icon})

if you want this in a dropdown

1 Like

Sorry for the late response,

Yes, it is.

1 Like

Move it to StarterPlayerScripts and see if one or two is placed

2 Likes

The Script already was in StarterPlayerScripts, I’m sorry for reading your previous post incorrectly.

The issue fixed itself, thank you for trying to help, though.

1 Like

Hey, there’s only one slight issue which is the TopBar being covered with chat when you don’t have voice chat enabled. When enabling voice chat it kinds fixes the issue and not overlap.

Is there a way I can enable a Bool Value on the Server-Side?

local BoxingGloves = accessoriesFolder:WaitForChild("BoxingGloves").Value
:bindEvent("selected", function()
			if BoxingGloves == false then
			print("BoxingGlove is false")
			BoxingGloves  = true
		end
		end)
1 Like

You can do that by using RemoteEvents:

Create a separate Script in ServerScriptService, create a RemoteEvent in ReplicatedStorage then follow:

In the Script located in SeverScriptService write:

local Event = game:GetService("ReplicatedStorage").RemoteEvent

Event.OnServerEvent:Connect(function(Object, Value)
  Object.Value == Value
end)

In the LocalScript write:

local Event = game:GetService("ReplicatedStorage").RemoteEvent
local BoxingGloves = accessoriesFolder:WaitForChild("BoxingGloves").Value
:bindEvent("selected", function()
			if BoxingGloves == false then
				print("BoxingGlove is false")
				Event:FireServer(BoxingGloves, true)
			end
	end)

How would I make it so the icon only pops up on one specific team and then when you switch teams, it disappears?