ChatScript in Studio Test has a 50% change to work

I’m not sure if this is a “me” problem or if everyone is experiencing this. I’m currently in work on a project that requires the roblox chat. With that being said I have absolutely no errors, or custom chat system in. This happens even with a default baseplate.

I click “Play” then I load in, the chat system isn’t there. I need to restart it over and over until it appears. It has about a 50% chance of working.

Heres a gif of what it looks like.

https://gfycat.com/WideeyedGlisteningLeafhopper

This happens in all games, baseplate, etc…

32 Likes

From my personal experience, it’s more of a 1 in 7 chance of working or so.

It’s an issue on my end too, sadly.

4 Likes

Experience the same issue while trying to test with APS. Doesn’t occur in team or local testing environments.

2 Likes

Yeah thats accurate. I hope this is fixed A.S.A.P

We are actively looking into this. Meanwhile if you want to test chat in studio, you could try testing it without APS by going to Settings - Studio - Advanced - Disable Accurate Play Solo

1 Like

This seems to be an issue that has been brought to light again as I am experiencing the same effects as described by everyone on this thread.

My project requires that the ChatScript be present but yields infinitely as there are times where it simply will NOT be inserted into the game/playerscripts. This has happened to me multiple times now (three in a row occurred before writing this post) and thus forces me to keep retrying until the ChatScript gets inserted into my PlayerScripts by chance (thus negatively affecting my Development Workflow).

14 Likes

This issue has come up for me as well. Without any external scripts being added into ChatServices, the chatbox sometimes doesn’t appear at all in Studio.

7 Likes

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