How to check whether the TopBar is enabled or disabled?

How can you check the state of the TopBar (i.e. enabled or disabled)?

For example, to check the transparency of the TopBar, you would use GetTopbarTransparency

The application I’m developing this for will be used within games I don’t own, therefore I can’t set my own variable for when the TopBar is enabled and disabled.

1 Like

By ‘disabled’, are you talking about disabling the top bar with starterGui:SetCore("TopbarEnabled", false), or starterGui:SetCoreGuiEnabled?

1 Like

SetCore, i.e. starterGui:SetCore(“TopbarEnabled”, false)

1 Like

I cannot find any documentation on getting whether or not the top bar is enabled. Unfortunately, I don’t think there’s a way of checking this. I’ll file a feature request, though—this is definitely something that we need.

Edit:

Edit 2:
The feature request was disapproved because:

2 Likes

The only thing I can find similar to this is a CoreGui BindableEvent called TopbarEnabledChanged, it is a member of CoreGuiChatConnections and is fired when the visibility of the Topbar is changed.

I don’t think what you’re looking for exists - it would be good to make a Feature Request for this.

2 Likes

Since there’s no way of checking if the top bar is enabled or disabled, I think that the only option is creating a global variable in a local script whenever you change it, but it would be really boring to do this if there’s multiple local scripts.

Example

image

1 Like

@Dandystan Appreciate that, we’ll hopefully see this implemented soon.

@LordHammy Thanks, I’ll have a look at this and see what I can make out of it.

@Herickman In the meantime, I’ll be adding an additional function to the API which developers can access via a module:

hd:SetTopbarEnabled(boolean)
2 Likes

It seems that isTopBarEnabled() is an internal function in the Roblox CoreScript for the Topbar. (Line 40) Hopefully this can be made usable using GetCoreGuiEnabled.

3 Likes

Interesting. I thought a GetCore equivalent for TopbarEnabled existed. As this isn’t the case, you can’t check for the topbar’s enabled state. A feature request should suffice just fine.

1 Like