Topbar+ v1 (deprecated) | Add additional functionality and themes to your topbar

Assuming you reference the modules correctly, this is fine to do too!

1 Like

@ForeverHD but i have to put it in the script or can i put it in your module which is in my script?

I’m going to be using the script for a new frame which I want only staff to see. How would I make it so the Icon is only accessible by a certain group rank?

game.Players.PlayerAdded:Connect(function(Player)
    if Player:GetRankInGroup(2) == 255 then
        -- Here you copy the local script in the player scripts or you call a RemoteEvent then client will by detect for show the TopBar
    else
        -- this is sad, the player is not Admin
    end
end)

Source : Player | Documentation - Roblox Creator Hub

@Med367367 I’m assuming the source code is within the module, so the module :+1:


@index_l You can achieve this by checking for the local players rank, using GetRankInGroup, then either:

  1. Hiding the icon if the local player is not of the desired role by doing icon:setEnabled(false)

  2. Only creating the icon if the player is your desired role

4 Likes

Amazing work with this! This will really help change the Topbar easily!

1 Like

@ForeverHD, can you set the display order higher?
Like to 5?
As I have a scirpt that has to do it as it’s currently at 0. :pensive:

1 Like

Sure can, use iconController:setDisplayOrder for this! You can also modify the ZIndex of individual icons by doing icon:setBaseZIndex.

2 Likes

Feature request: To help make Topbar+ look even more like Roblox’s topbar API; can you make it so the icons disappear when MenuOpened (see GuiService)

6 Likes

You can now align icons left or right using icon:setLeft() and icon:setRight(). Big thanks to @JohnnyMorganz for this feature!

@ElliottLMz Icons now automatically disappear when the Roblox menu is toggled. Thanks for the suggestion!

b2f7a12aee85f0a76ac5f56ea472274c

5 Likes

Hey I have a question to ask say for instance that i create a settings button and can i notify() from another script because I’m not sure how to do that.

1 Like

Sure can! Simply retrieve the icon object you wish to notify, then call the notify method:

local IconController = require(your.reference.to.the.IconController)
local icon = IconController:getIcon("yourIconName")
icon:notify()
1 Like

We’ve been having reports from players that Topbar+’s icons are being behind the chat icon, rather than next to it.

We change the Chat visibility somewhat regularly so this is very problematic for our game.

3 Likes

Do you have any images of this, and any definitive ways to reproduce?

Also…

  1. How are you changing the chat visibility? (e.g. game:GetService("StarterGui"):SetCoreGuiEnabled("Chat", false)
  2. Are you creating a fake chat icon with IconController:createFakeChat()
  3. When did you start receiving these reports?
2 Likes

Alright thanks! Very useful instead of making lots of side guis.

2 Likes

Whenever you go to freecam mode (Shift + P) then go back to non-freecam, it disables the chat icon, and only the chat icon.

1 Like

Good spot, I’ll open up an issue for this

1 Like

Introducing…

Tips

Dropdowns

Console Support

(plug-in a controller to test)

Gradients

image

Cell Sizes & New Alignments

Behavioural Improvements & Bug Fixes

Including a state overlay @ElliottLMz (the color and transparency changes when an icon is hovered over and pressed) and a fix for the chat when the free cam is toggled @6cv3.

Huge thanks to @Lucke0051 for many of these features!

Get Started

You can learn about implementing and using these new features at the docs.

14 Likes

How do I add the dropdowns to HD Admin?

1 Like

You can apply a dropdown to an icon by doing something like the following:

icon:createDropdown({
    {
        name = "About",
        icon = "rbxassetid://2746077483",
        clicked = function()
            print("Navigate to About")
        end,
        events = {}
    },
    {
        name = "Commands",
        icon = "rbxassetid://2746074974",
        clicked = function()
            icon:select()
        end,
        events = {icon.selected}
    },
    {
        name = "Roles",
        icon = "rbxassetid://2746105644",
        clicked = function()
            print("Navigate to Roles")
        end,
        events = {}
    },
    {
        name = "Settings",
        icon = "rbxassetid://2746112353",
        clicked = function()
            print("Navigate to Settings")
        end,
        events = {}
    },
})

For HD Admin itself, we don’t intend to add a dropdown until V3. You can retrieve the V2 icon by doing:

local hdMain = require(game:GetService("ReplicatedStorage"):WaitForChild("HDAdminSetup")):GetMain()
local TopbarController = hdMain:GetModule("TopbarClient")
local hdIcon = TopbarController:getIcon("HDAdmin")
2 Likes