How to disable the roblox hotbar

So i’m making a custom hot bar and have a problem with the roblox hotbar in the way. Is there some code I can type up to remove the roblox hotbar? The frame is always behind it.

Here is what it looks like.

Replies are thanked!

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

LocalScript in StarterPlayer > StarterPlayerScripts or in StarterGui:

local StarterGui = game:GetService("StarterGui")

while wait() do
    local success, result = pcall(function()
        StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
    end)
    
    if success then break end
end

print("Backpack disabled.")
5 Likes

Why do I have to put it in a loop?

3 Likes

I find that sometimes the CoreScripts are not ready for the request, especially if the client is really laggy when joining the server. The script simply runs until the request is successful, then it will break out of the loop. If there are no problems with the CoreScripts, then it will simple run once anyways. It’s just a precaution I tend to use, but it’s not necessary. If you’d like, you can simply just change it to:

local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
2 Likes

Oh. I did not see the break. That might be better. Thanks for the reply. :smile:

2 Likes