When I disable and then re-enable the Topbar, I notice that the player’s name, age restrictions and health bar are no longer visible. The chat, inventory and emotes icons are there, but anything that is usually seen in the right sight of the Topbar no longer appears.
The bug reproduces when the LocalScript is placed in StarterPack, StarterPlayerScripts, or ReplicatedFirst. When it is placed in StarterGui or StarterCharacterScripts, the Topbar appears with the health bar as normal.
The bug does not occur without a relatively large waiting time. Having wait() does not cause any issues, but wait(1) does.
Note that I tested this in a completely fresh place, baseplate and all.
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCore("TopbarEnabled", false)
wait(1)
StarterGui:SetCore("TopbarEnabled", true)
I suggest just changing the transparency of the Topbar, as disabling it will disable everything that the Topbar consists of (Chat, Backpack, and so on).
You can change the transparency as desired by doing something along the lines:
Thank you for the suggestion, but I am aware of the ability to change the transparency of the top bar. In fact, setting the Topbar transparency to 0 would only make the background of the Topbar visible. Not exactly related to what I talking about.