ChatScript in Studio Test has a 50% change to work

I too am experiencing this bug as of the last Roblox editor update pushed out a few days ago. About 50% of the time the chat bubble shows up, but if you click it nothing happens, and you can’t access chat via “/” either. There are no errors or warnings or timeouts being shown in console.

Additionally, starting a blank Baseplate project will encounter this bug, which leads me to believe that it is a problem with Studio, not on our end.

4 Likes

We’re also experiencing this issue. It seems that ChatScript is not being parented to PlayerScripts. Some of our scripts that depend on ChatScripts are raising infinitely yield warnings:

Infinite yield possible on 'Players.MyPlayer.PlayerScripts:WaitForChild("ChatScript")'

8 Likes

Good thing its not a me issue I knew there was something wrong thanks for confirming it.

4 Likes

This bug has shown up again, not sure what’s causing it but it seems that somehow I join before the script can finish loading.

2 Likes

A hacky fix to patch this kind of bug is this following localscript inside your StarterPlayerScripts.
It seems the Player is being added faster than ChatService even inserts the ChatScript localscript into StarterPlayerScripts.

The script will make sure it’s running in Studio and then checking if the localplayer has ChatScript in their PlayerScripts for 3 seconds. If the player doesn’t have that localscript after 3 seconds, it copies one over for Chat to load. This doesn’t copy over BubbleChat if you have that enabled, but I’m sure we’re all here to just test chat commands.

TL;DR Roblox Studio still creates the client far too fast than normal Roblox games in which the server had 2-4 seconds to run, to parent things to the locations needed. The local player didn’t get the ChatScript from StarterPlayerScripts since it didn’t have it parented yet.

If you use BubbleChat ingame and want to make sure BubbleChat also works too, set it to true, else false.

This script goes as a localscript into game.StarterPlayer.StarterPlayerScripts.

wait(1.5)
local RunService=game:GetService("RunService")
local BubbleChatEnabled=true
if RunService:IsStudio() then
	local PlayerScripts=game:GetService("Players").LocalPlayer:WaitForChild("PlayerScripts")
	local ChatScript=PlayerScripts:WaitForChild("ChatScript",3)
	local BubbleChat=PlayerScripts:FindFirstChild("BubbleChat") --we already waited 3 seconds, this should exist if it exists.
	local chatService=game:GetService("Chat")
	wait(.1)
	if not ChatScript then
		ChatScript=chatService:WaitForChild("ChatScript") --since the PlayerScripts doesn't have it, grab it from chatService.
		wait(.1)
		ChatScript.Archivable=true
		ChatScript:Clone().Parent=PlayerScripts
	end
	if not BubbleChat and BubbleChatEnabled and game.Chat.BubbleChatEnabled==false then
		BubbleChat=chatService:WaitForChild("BubbleChat")
		wait(.1)
		BubbleChat.Archivable=true
		BubbleChat:Clone().Parent=PlayerScripts
	end
end 

Edit: Updated 2/13, Seems items inside the scripts also may not be replicated yet before cloning, another wait.
Edit: Updated 2/14, Set archivable true and check if using new or old bubble chat.
Edit: Cleaned it up, 2/18

12 Likes

I have this same issue as well its quite annoying while editing chat related scripts like my recent fork of the old bubblescripts.

2 Likes

This bug has shown up in my game and this bug becomes very annoying when you want to test a script that works when you send a specific message in the roblox chat so hopefully it gets fixed soon.

3 Likes

This issue came back up, and it’s really annoying. It breaks Topbar+ V2. It has been really annoying when working on my game.

3 Likes

I just got this bug when I was working on my admin system. It’s really annoying, please try to fix it

3 Likes

This bug also breaks dialogs. Their bubbles don’t show up anymore.

2 Likes

ChatScript doesn’t seem to be archivable, and you can’t clone non-archivable objects (or I couldn’t, at least). I reworked your script with this in mind, this doesn’t support bubblechat though (because it’s a property under the Chat service now).

wait(1)
RunService = game:GetService("RunService")
Chat = game:GetService("Chat")

if RunService:IsStudio() then
	local playerScripts = game:GetService("Players").LocalPlayer:WaitForChild("PlayerScripts")
	local chatScript = playerScripts:WaitForChild("ChatScript", 5)
	
	if not chatScript then
		Chat:WaitForChild("ChatScript").Archivable = true
		wait(0.2)
		Chat:WaitForChild("ChatScript"):Clone().Parent = playerScripts
	end
end
4 Likes

I’ve only had this happen in one of my games. I wasn’t really sure on why it was happening. :confused:

3 Likes

Has been happening to me recently. Hope a staff member comes around and does something about it.

6 Likes

Getting the same issue here. About 50% of the time it works, 50% it doesn’t - mostly random.
When it doesn’t, PlayerGUI has TWO clones of ‘ChatInstallVerifier’ script created.

2 Likes

Could we please get some sort of acknowledgement of this bug? It’s clearly back and more annoying then ever, yet it seems that there’s a sort of “radio” silence on this issue. It’s affecting my workflow, a lot. It’s so irritating to me that I’m downright disabling the chat if I’m in studio because it’s such a habit to test the chat. I believe this only started coming back up after the latest studio update. I never had any issue with the chat script until now.

Side Note

Maybe this is just me, but when it doesn’t work, I get a really random print coming from studio that seems to be untraceable:

RobloxStudioBeta_K2bRaYyX2I

Very strange.

5 Likes

I have the same Issue. When I however simulate a Server then the issue is gone.

Oh. Most of my games used a forked version of game.Chat so it always is Archivable true.

You technically would need to copy BubbleChat over as well if using the old version.

I am, as of yesterday, still experiencing this issue.

I can confirm this bug is happening to me and it started yesterday I believe. Glad I wasn’t the only one

Same issue here, really getting annoying since im testing an admin system.
Has been happening for a while now, chat very rarely shows up for me.

3 Likes