Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to hide the dark top bar ?

Hello, I'm trying to get rid of the dark top bar by messing with the RobloxGui in the CoreGui but it doesn't seem to work.

Here's my code :

local CoreGui = game:GetService("CoreGui")

CoreGui.RobloxGui.TopBarContainer.BackgroundTransparency = 1

The output throws this :

00:14:45.456 - An error occurred 00:14:45.457 - Script 'Players.Player1.PlayerGui.LocalScript', Line 3 00:14:45.457 - Stack End

Thanks in advance for any kind of help

1 comment

2 answers

✓ Accepted answer

It's simple, though will need to be done with a pcall function, which just give you access to hide it.

wait()
pcall(function()
	local starterGui = game:GetService('StarterGui')
	starterGui:SetCore("TopbarEnabled", false)
end)

One you put this inside a localscript, I prefer StarterScriptService, and it will hide the top bar.

Link to the page is here.

Pyrondon had the original answer.

3 comments

0

pcall is not exclusive to Roblox.

0

Note that disabling the topbar with this method will also disable Chat, Backpack, and Playerlist.

0

correct, the reason you use pcall is due to error handling incase you tried to set something that is not present. Although you most likely are able to do this without pcall, since i know you can remove health bar without doing it. but it is otherwise better to use pcall for common actions you believe that can return a nil

Is there any way to keep the Chat, Backpack and Playerlist ? Or will I need to script them ?

1 comment

0

making the player list and backpack is not hard to do, but the chat most likely is.

This discussion is preserved as it was. New answers, comments, and votes are closed.