With the ChatService’s Chat function, it will not work for several seconds after you have respawned/reset. Attached you will find a sample place file. Chat_bug.rbxl (23.8 KB)
Repro Steps (Test → Play or an actual server works):
Press the “Chat msg” button for you to see it’s working
Reset (Esc > Reset > Confirm)
Press the “Chat msg” button again.
It takes several seconds for the messages to start appearing above the character. This bug is reproduceable 100% of the times as it affects our gameplay since we use a custom chat bar rather than Roblox’s default.
Great find, will probably help the engineers in isolating the issue. Just on a side note: That is the default Roblox Chat which would not be available in games such as mine that use a custom chat bar. Nonetheless, thanks for that.
So basically, in this system the green chat is supposed to be showing up on the table where it’s shown in the pic. Player’s 1 chat is supposed to show up on the blue squares, except it does sometimes only to be taken over by the other players chat which has no correspondence to the object being called Chat() on.
Not to mention half the time Player2’s chats will show up above Player1 and making it look as if Player1 is chatting. Potential new issue with the new chat system.
Hi Shawnyg,
It seems that you are using Chat() in a LocalScript (in your Chat_bug.rbxl file). Chat:Chat() has undefined, unsupported behavior when run on the client (instead, you should run this in a Script, which runs on the server, and properly sends out messages to other clients). We’ve filed a ticket internally to update our documentation page to specify that :Chat() should only be called by the server, not the client.
Thank you!
We tried to port this over to a server script, but we ran into a new problem…
How are we supposed to properly filter the text from the sender player to each local player? The reason we used the :Chat() API in a local script for the past 2+ years (aside from not knowing any better) was because the server would filter the message for each player separately, so that we follow Roblox’s guidelines on text filtering.
We would loop through players, use the following API for each player, and then send that string using a remote event. Then the local player would use the Chat API to display the bubble. This ensures each local player sees the properly filtered version of the message, depending if they are under 13 or 13+.
If we use Chat API in a server script, it will display for everyone. Therefore, we need to use the most strict filtering API for the message (under 13), which is below. This would be devastating for our players, as we know the strict filtering makes it really hard to say anything, even worse for a RP game.
How does the default Roblox chat accomplish this? We have a custom chat system which works almost exactly like the default chat, except we’ve integrated it into a radio gui for Police and Fire teams.
As this post is for your reported bug (which we have determined to be an artifact of unsupported behavior of the API), I would appreciate if you can mark my previous response as the solution (as it addresses this particular bug report), for the sake of the post’s clarity.
With respect to your current situation, I believe it may be more appropriate to move the conversation by making a new post under Development Discussion (as opposed to Bug Reports) describing your situation.
Please reply to this thread with the new post’s link. I would be more than happy to follow up with that post and provide potential approaches (and hopefully, other members of the forum can also pitch in too).
Just wanted to post an update:
After some discussion, considering the use cases (i.e. toggle bubble chats that can be only seen by specific client(s) from say, an NPC) we’ve reclassified this as a bug and will be working on this.
Basically, the issue seems to be that partOrCharacter parameter in Chat:Chat(partOrCharacter, …) does not work consistently if the target character has just respawned. We’ll keep this thread updated on progress.
Another update:
Currently, Chat:Chat() will work properly if partOrCharacter parameter is either a Part that’s not parented to a valid Character, or just the Character model (basically, passing in any parts inside the Character for partOrCharacter will not work consistently). We are working on a fix for this, but for now a workaround will be to just pass in the Character itself (not any Parts inside the Character).