Chat message doesn't show up in my game, but the same code will work in another game

So I’ve been trying to add a system message in the user chat, which I’ve done before. I looked it up since it’s been awhile, and got some ideas. I spent several days trying to figure out why it wasn’t working.

The code will not work in my game specifically, which obviously is an issue since I’ve poured a ton of time into the project already and I am not willing to start over. On a baseplate, the chat message pops up perfectly, no issues.

local TextChatService = game:GetService("TextChatService")
local generalChannel = TextChatService.TextChannels.RBXGeneral

generalChannel:DisplaySystemMessage("[Server] Hello World.")

With this code, it will put the text in the chat box, but in my current project the same code in a local script in the exact same place, will yield absolutely nothing. The script IS running, I have verified it several times (I had been getting errors earlier)

I’m not sure if something is broken within the engine, or if I changed some setting that’s now preventing it from actually outputting a message or if there’s some kind of other code that’s interfering.

edit: my brain is fried, im so beyond tired that I can’t write a coherent forum post atm, but I think I got everything, please forgive me if I forgot something. edit 2: I have also spent a substantial amount of time reading about potential causes, and I have read almost everything there is and nothing has helped me

1 Like

Are you using TextChatService or LegacyChatService in your game?

I am using the TextChatService

Are you sure? You can check here:
image

1 Like

I just checked once again, and yes, I am.

image
Are you 100% sure the chat looks exactly like this?

If so, alternatively (not sure if this is a good idea) you can just revert back to the LegacyChatService and try game:GetService(“StarterGui”):SetCore(“ChatMakeSystemMessage”, {[“Text”] = “hi”})

This works, which makes sense, but I’d rather not have to revert back to legacy. I’m really confused why it won’t work otherwise.

I don’t understand, but now it’s working perfectly fine. I literally don’t understand this even a little bit. I was hoping to find some solution that somebody could use later if they have the same problem, but I don’t even know what happened.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.