TopbarEnabled broken

As of today we started to get this error in our game; breaking every loading screen. We believe its due to the emotes update changing the top bar. The specific code used to disable the top bar is:

local starterGui = game:GetService(‘StarterGui’)
starterGui:SetCore(“TopbarEnabled”, false)

6 Likes

I know I have been getting this too I just ignored it since my loading screen normally didn’t load in the first place.

1 Like

Dev from the same project the thread is about. Pushed a quick and dirty fix to stop the loss of retention, posting it for anybody else who’s been impacted by this.

local starterGui = game:GetService(‘StarterGui’)
repeat wait() until pcall(function() starterGui:SetCore(“TopbarEnabled”, false) end)

1 Like

for now we just wrapped it in a pcall, but thats also a possible option.

1 Like

I’m not sure if this might have disappeared from the developer hub, but you’re meant to pcall SetCore calls, and you might have to repeat them until they have been registered by the core scripts.

So what you’re seeing here is totally intentional behavior and not a bug. Always wrap SetCore calls with pcall and retry them.

Odd that the game has been out with this same functionality for over a month and this problem has never happened before.

1 Like

That could well be, but they don’t offer the guarantee that SetCore will actually work without error. You typically don’t want to rely on properties that are not guaranteed.

It’s actually described here in the first section on the developer hub:
https://developer.roblox.com/en-us/api-reference/function/StarterGui/SetCore

If you think that is not clear enough, you should consider writing a topic in #platform-feedback:developer-hub to have it improved.

They may have recently changed the core scripts, I just started getting issues about an hour ago with removing the top bar.

EDIT : Yep, they recently added the new user emotes and such to the topbar.

1 Like

This was fixed a few years ago so you no longer needed to do it, it’s only recently that this issue has come back.

No, you are incorrect. Read the documentation.

2 Likes

I actually did have this fixed a few years ago, and its probably worth to see what changed that reverted this behavior.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.