TopBar enabled false (SOLVED)

Hello! I’m trying to disable this thing:


I get this error:

After running this script:

local StarterGui = game:GetService("StarterGui") 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
StarterGui:SetCore("TopBarEnabled", false)

I’m only trying to disable the gap between the ui and the screen not the buttons on the topbar too.
Any solution?

Go to the ScreenGui and enable IgnoreGuiInset

1 Like