Can you enable to topbar?

Hello. I was looking through what you could do with the function game.StareGui:Setcore(), and I stumbled across one I hadn’t seen before. I tried it out, but I am not seeing the topbar become visible. I thought that maybe it didn’t work anymore since they removed the topbar, but then I thought that they wouldn’t just leave a parameter to a function when it doesn’t work anymore. Here’s what I’ve been trying:

game.StarterGui:SetCore("TopbarEnabled", true)

Is this how I would go about doing this, and if so, why isn’t this working for me?

If this function is deprecated, could anyone send me the assetid for a copy of the topbar? I might be able to use an image label at the top of the player’s screen to simulate the top bar.

Thanks,

  • Ham

It seems that it was removed, since many wanted to hide it, it is just a speculation and this can replace it

local GuiInset = game:GetService("GuiService"):GetGuiInset()
local TopbarFrame:Frame = 
TopbarFrame.Size = UDim2.new(1, 0, 0, GuiInset.Y)

GetGuiInset returns the size of the topbar.

1 Like

This is what I got

local GuiInset = game:GetService("GuiService"):GetGuiInset()
local TopbarFrame:Frame = Instance.new("Frame")
local topbarGui = Instance.new("ScreenGui")
topbarGui.Parent = game.StarterGui
TopbarFrame.Parent = topbarGui
TopbarFrame.BackgroundTransparency = 0.5
TopbarFrame.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
TopbarFrame.BorderSizePixel = 0
TopbarFrame.Size = UDim2.new(1, 0, 0, GuiInset.Y)

Unfortunately, it doesn’t show up on my screen. I can see that it exists in the explorer, but I still can’t see it on my screen.

Thanks,

  • Ham

What happens is that you placed it in StarterGui, you will only see it when the player restarts, you must place it in PlayerGui

topbarGui.Parent = game:GetService("Players").LocalPlayer.PlayerGui

Also, set IgnoreGuiInset to true so that it fills the entire screen

topbarGui.IgnoreGuiInset = true
1 Like

Ah, thank you.

Unfortunately, it is still doing some odd things. For some reason, it isn’t in the right place.

Here’s the code again

local GuiInset = game:GetService("GuiService"):GetGuiInset()
local TopbarFrame:Frame = Instance.new("Frame")
local topbarGui = Instance.new("ScreenGui")
topbarGui.Parent = game:GetService("Players").LocalPlayer.PlayerGui
TopbarFrame.Parent = topbarGui
TopbarFrame.BackgroundTransparency = 0.5
TopbarFrame.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
TopbarFrame.BorderSizePixel = 0
TopbarFrame.Size = UDim2.new(1, 0, 0, GuiInset.Y)

Thanks,
– Ham

For the position part, I tried to get it to line up, but I just couldn’t get it to be perfect.
When I got it close one way, it wouldn’t work the other.

Windowed-


Fullscreen-

local GuiInset = game:GetService("GuiService"):GetGuiInset()
local TopbarFrame:Frame = Instance.new("Frame")
local topbarGui = Instance.new("ScreenGui")
topbarGui.Parent = game:GetService("Players").LocalPlayer.PlayerGui
TopbarFrame.Parent = topbarGui
TopbarFrame.BackgroundTransparency = 0.5
TopbarFrame.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
TopbarFrame.BorderSizePixel = 0
TopbarFrame.Size = UDim2.new(1, 0, 0, GuiInset.Y)
TopbarFrame.Position = UDim2.new(0,0,-0.045,0)

As I said before comment edited activate IgnoreGuiInset and do not change the position of the bar

Thank you so much. I completely forgot IgnoreGuiInset was a property of ScreenGui. This helps with a lot of things I have been working on.

Thanks,
– Ham

1 Like

The topbar was deprecated in favor of the new one that no longer requires that function, that SetCore action works for backward compability.