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

How to disable the top bar and enable the chat?

Is there any way I can disable the top bar, but having the chat visible? I have tried the code bellow, but it doesn't work and no errors are printed.

local starterGui = game:GetService('StarterGui')

wait()
pcall(function()
	starterGui:SetCore("TopbarEnabled", false)
	starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
end)

2 answers

✓ Accepted answer

If you're not too bothered about the player name and age remaining at the top right, you can instead use PlayerGui:SetTopbarTransparency, which sets the transparency of the topbar to a number between 0 (opaque) and 1 (transparent), and StarterGui:SetCoreGuiEnabled, which allows you to disable specific parts of the core GUI.

We can make the topbar transparent and disable the player list, health, and backpack, leaving only the chat (and the player name and age, which can only be removed using StarterGui:SetCore):

local starter_gui = game:GetService("StarterGui")
local players = game:GetService("Players")
local local_player = players.LocalPlayer
local player_gui = local_player:WaitForChild("PlayerGui")

-- Make the topbar transparent.
player_gui:SetTopbarTransparency(1)
-- Disable all core GUI except chat.
starter_gui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
starter_gui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
starter_gui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

1 comment

0

Thx!

Hi celcinschi,

When you disable the Topbar using that method, then the Chat also gets disabled along with it. That's why you can't enable the chat while disabling the Topbar.

I would recommend just making a custom chat system, not very hard to do and an experience that would prove to be useful in the future.

####Best regards,

####KingLoneCat

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