Hiding Roblox toolbar under ScreenGUI

So, I have a start screen that has a play button, is there a way to disable the Roblox toolbar and leaderboard until the play button is pushed?


With the leaderboard you should be able to via Script, for the Roblox toolbar, I’m not so sure.

game:GetService(“StarterGui”):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
Disables every roblox UI

Insert a LocalScript somewhere inside 1 of the client services:

local StarterGui = game:GetService("StarterGui")
local Button = script.Parent

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)

    StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
    StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)

I believe you can use SetCoreGuiEnabled to disable certain ui elements, and using SetCore("TopbarEnabled",false) should disable the topbar, remember these are StarterGui methods

local StarterGui = game:GetService("StarterGui")
local Button = script.Parent



You don’t need to use SetCoreGuiEnabled if you disable the topbar, as that it’ll do it for you

I tried this, it seems to work but when my UI resets your character, it gets rid of the UI again. How would I fix this? Here is a recording below. I will also include an image of where I put your script.



This is probably because the PlayerGui seems to reset every Instance that’s parented inside?

Try parenting the script to where your Button is supposed to be (Or create another ScreenGui and place it there), if the ResetOnSpawn property is set to false on the Gui Object then it should work

local Player = game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
local StarterGui = game:GetService("StarterGui")

StarterGui:SetCore("TopbarEnabled", false)

local StartGui = PlayerGui:WaitForChild("StartScreen").Main

    StarterGui:SetCore("TopbarEnabled", true)

Do you mean I should put the localscript inside of my screen GUI?

If the ResetOnSpawn property is set to false, yes

Otherwise just create a new ScreenGui, set that property to false, and that’ll temporary hold the LocalScript there (Hopefully)

Thanks for the help, this works.

1 Like
game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)

Set to true when it shall come back. :slight_smile:

It’s just a temporary solution until we can figure out why the script keeps resetting for some random reason I suppose, so np

Also @ItsNickBoi110 You’re kinda a bit late but okay