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

I’ve gone ahead and made it so that its just StringValue and not StringValue.Value, here is my code:

local playerGui = player.PlayerGui
local replicatedStorage = game:GetService("ReplicatedStorage")
local iconModule = replicatedStorage.Icon
local Icon = require(iconModule)
local IconController = require(iconModule.IconController)
local Themes = require(iconModule.Themes)


local Hi = replicatedStorage:FindFirstChild("MusicTitle")

-- Apply BlueGradient Theme
IconController.setGameTheme(Themes.BlueGradient)

local Ye = Icon.new()
:setLabel('Song: ' .. Hi.Value)
:setOrder(3)
:bindEvent("selected", function()
	print("selected!")
end)
:bindEvent("deselected", function()
	print("deselected!")
end)

Hi.Value.Changed:Connect(function()
	Ye:setLabel("Song".. Hi.Value.Value)
end)

I keep getting this error

Players.KasimAkr.PlayerScripts.TopbarPlusClient:16: attempt to index nil with ‘Connect’

3 Likes

Try this instead:

local playerGui = player.PlayerGui
local replicatedStorage = game:GetService("ReplicatedStorage")
local iconModule = replicatedStorage.Icon
local Icon = require(iconModule)
local IconController = require(iconModule.IconController)
local Themes = require(iconModule.Themes)


local Hi = replicatedStorage:FindFirstChild("MusicTitle")

-- Apply BlueGradient Theme
IconController.setGameTheme(Themes.BlueGradient)

local Ye = Icon.new()
:setLabel('Song: ' .. Hi.Value)
:setOrder(3)
:bindEvent("selected", function()
	print("selected!")
end)
:bindEvent("deselected", function()
	print("deselected!")
end)

Hi.Changed:Connect(function()
	Ye:setLabel("Song".. Hi.Value)
end)

The connect method belongs to ‘Hi’ instead of it’s value.

6 Likes

It works! I appreciate you helping me out, have a great rest of your day!

3 Likes

Hello! So I am trying to set up my admin module with Topbar+ v2. Topbar+ v1 was working just fine. I changed the number, and it no longer works.

require(6311707237)

If anyone can help, please let me know. Thanks :slight_smile:

Hi there, instead of auto-updating via a MainModule, v2 auto publishes all the latest releases to our GitHub repo and model:

For v2 all you have to do is move the TopbarPlus (aka Icon) module to ReplicatedStorage then require that from the client.

Do note v2 is not 100% compatible with v1 - it has some slightly different methods and events, and themes have been completed upgraded.

5 Likes

Important update: we’ve just discovered and patched a critical bug with the overflow that was causing icons to be randomly hidden. We highly recommend all users update to the latest v2.3.1 release which can be done by re-adding the TopbarPlus model or downloading the latest release:

6 Likes

Hey!

Why is this happening?

image

When going in freecam mode (Shift+P) and going back it seems to fix it

1 Like

That seems like an older bug! Try updating the module on your game!

1 Like

Hi there, as Lucas mentioned this is likely to do with a bug mentioned in this release:

Can you update to the latest version and let us know if that fixes it? If not, can you share your icon constructor code?

4 Likes

Yep i was just on an older version, thanks!

1 Like

Can you provide details on how you reproduce this? If you could share an uncopylocked stripped down-place of just the isolated bugged icons even better.

2 Likes

Hello,

I’m also getting this bug, I’ve only started playing around with it recently and have already ran into this bug.

What i have done:
Added a wait before the icon function – Same Bug
Reimported the script – Same Bug

As Overfearful says, going into freecam and out again fixes it.

Here is a portion of the code,

local Fly
local Flyimg = "https://www.roblox.com/library/3170108676/letter-f"
local GS
local GSimg = "https://www.roblox.com/library/419504645/Letter-G"
local S
local Simg = "https://www.roblox.com/library/195452703/Letter-S"

function MakeIcons()
	-- Quick shortcuts to certain things
	-- Fly
	Fly = icon.new()
	Fly:setImage(Flyimg)
	Fly:setTip("Lets you fly!")
	Fly:setOrder(2)
	GS = icon.new()
	GS:setImage(GSimg)
	GS:setTip("Lets you skip anything that needs a gamepass")
	GS:setOrder(3)
	--Spawn
	S = icon.new()
	S:setImage(Simg)
	S:setTip("Teleports you to spawn")
	S:setOrder(4)
end

MakeIcons()

And another intreasting bug is that the images aren’t showing up on the buttons, Even when the buttons overlap any idea on how to fix this (and the main bug)?

Thanks.

1 Like

What version of TopbarPlus are you using? Can you update to the latest version (i.e. re-add the model back into your game) and see what happens. This sounds very familiar to a bug we patched in a previous version.

Edit: I’ve just tested your code and there does appear to be a bug. Ill look into this now

1 Like

Thanks for the report, this should be patched now:

1 Like

Just imported into the game with the code and it works. Thanks!
I am still getting the promblem with the images though, Do you know anyway to fix that?

Make sure to use the AssetId instead of the WebsiteId.

An easy way to convert a WebsiteId into an AssetId is by pasting it into the Texture property of a Decal for instance.

You can also get the AssetId by right clicking an item in the toolbox!

2 Likes

Ah, Thanks again!

This is an amazing module with a useful api document to learn. This module lets user have shortcuts to different settings or just make the screen cleaner altogether. I would definitly recommend this to someone else if they needed something like this. :slight_smile:

2 Likes

Fix your module
image

See Topbarplus - Contributing for writing bug reports. The image you pasted is for a script called MilkAdmin instead of TopbarPlus.

3 Likes

Why did this happen?

image