ChatOnWithTopBarOff not working

Basically trying to disable this
Name
And looked around here and basically only solution seems to be remove the top bar and then allow the chat in the ChatSettings module to still run when the TopBar is disabled, however, this doesn’t work.

StarterGui:SetCore('TopbarEnabled', false)
module.ChatOnWithTopBarOff = true

No error in the output

You can never remove the 13+ thing. That’s something Roblox does to comply with COPPA (please correct me if I’m wrong).

image

2 Likes

Ik I cant’ but removing the topbar moves the +13 to the left hand side of the screen (which is fine)

I wanna remove the player name, and have the +13 on the left hand side of the screen and only way to do that is to disable topbar compeltly, but this variable in the chat settings SHOULD still allow the chat even when the topbar is disabled.

I believe there’s a setting in the chat module itself that allows you to enable the chat even if you disabled the top bar… I’ll update this if I can find it.

That’s literally what my question is about…

module.ChatOnWithTopBarOff = true

The point I’m saying is that it doesn’t work

As a prerequisite type of thing, I used to disable the core GUI and then re-enable what I wanted slowly but shortly in ReplicatedFirst… but this is like V1 of my framework and I’ve recently deprecated it, so its taking a while looking for the code.

Found it

@NinjoOnline

local StarterGui = game:GetService('StarterGui')
 
--REMOVING TOPBAR & LOADING SCREEN -- 
while not pcall(function()
	StarterGui:SetCore("TopbarEnabled", false) 
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)	
end) do end

Don’t do it like this. You seem to be trying to modify the module at runtime. The expected method to do this is to override the chatSettings script by placing a replacement in the place where it should be (so under chatservice, clientchatmodules and with the same name).

So, just copy the script at runtime, stop the game then paste it back in the place it should be and modify any values you want to.

You can’t do this from another script.

Ahh, nice catch if that’s the case. I wasn’t even thinking about that.

I use both anyways for good measure :smiley:, Nothing wrong with a bit of redundancy.

1 Like

Not entirely sure what you mean here? If by you mean runtime as in game, then no I’m not. I have the modules and all inside the ChatService and editing it from studio before hitting play

Also, tried that, didn’t work. Put a print at the end to see if it was even running and it did run, but the chat never appeared

So, you’re setting the setting in an overridden version of the module?

I was just confused by your line:

Are you definitely not accidentally disabling the chat with another setting? Otherwise, I can’t see what you did wrong.

I have these inside RepFirst, at that’s it in terms of SetCore and SetCoreGuiEnabled. Never used anywhere else

StarterGui:SetCore('TopbarEnabled', false)
StarterGui:SetCore('ResetButtonCallback', false)

He was talking about copying the entire chat files, after the game starts in run mode. And then pushing stop to go back in studio and pasting them in the run service manually. And then setting the properties you want to true.

Afterwards when you run the game the chat won’t be created but your files will be used instead.

https://gyazo.com/9b5c7dacdb85295ca7a932daa45d03ac.gif

That’s exactly what I’ve already done before we even started…

Have you tried my line of code with the enabling chat explicitly?

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)

^…

Ahh didn’t know that was in response to me.

Did you wrap it in a pcall? The while loop actually isn’t my code. I was having the same issues with setting core stuff. Somewhere on the wiki, or devforums. I read that you should wrap it in a pcall and use the while loop haha… Which is why you have two different types of parameters. Not my best work if I do say so myself.

Try using the snippet

--REMOVING TOPBAR & LOADING SCREEN -- 
while not pcall(function()
	StarterGui:SetCore("TopbarEnabled", false) 
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)	
end) do end

and adding your core stuff to it. it might work… haha.

I’ve done the exact same thing, however in order to open the chat, I had to use a separate script to open the chat frame in the coregui, with a custom button.

In the StarterGui, I have a gui button placed where it would usually be in the top bar with this code in the button:

local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local chatGui = playerGui:WaitForChild("Chat")
local frame = chatGui:FindFirstChild("Frame")
local button   = script.Parent
button.MouseButton1Down:Connect(function()
	frame.Visible = not frame.Visible
end)

The ChatOnWithTopBarOff bool exists explicitly to counter this. If you disable the TopBar, all the CoreGuis are disabled as well and can’t be re-enabled from the SetCoreGuiEnabled method. Regardless of whether you wrap this in a pcall or not, it won’t work.

From the Developer Hub:

Determines whether the topbar is displayed. Disabling the topbar will also disable all CoreGuis, such as the chat, inventory and player list (i.e. those set with SetCoreGuiEnabled).

Why it’s not working though, I’m not sure. It looks fine.