Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to hide the dark top bar ?

Asked by
Vitou 65 Snack Break
8 years ago

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

2 answers

Log in to vote
3
Answered by 8 years ago

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.

0
pcall is not exclusive to Roblox. User#6546 35 — 8y
0
Note that disabling the topbar with this method will also disable Chat, Backpack, and Playerlist. Goulstem 8144 — 8y
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 scottmike0 40 — 8y
Ad
Log in to vote
0
Answered by
Vitou 65 Snack Break
8 years ago

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

0
making the player list and backpack is not hard to do, but the chat most likely is. scottmike0 40 — 8y

Answer this question