This issue was reported before, but it only presented an issue for public chat messages.
My issue lies with Team Chat specifically. I’ve confirmed that simply attempting to use :DisplaySystemMessage() on a Team Chat will add an extra space between the “[Team]” tag and the message it’s delivering.
Set-up:
0. Ideally perform this test on an empty baseplate for optimal bug testing results.
- Create a Team, color and name doesn’t matter
- Get the relevant team chat through code
- Display a system message through the Team channel (not RBXGeneral or RBXSystem).
Conditions:
- This bug can occur in ANY game.
- This bug happened the second I attempted to use :DisplaySystemMessage() on a Team TextChannel.
Code (LocalScript, put in StarterPlayer → StarterPlayerScripts):
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
local My_Team = Players.LocalPlayer.Team
if not My_Team then return end
for _, Loop_Channel in TextChatService:WaitForChild("TextChannels"):GetChildren() do
if not Loop_Channel:IsA("TextChannel") then continue end
if Loop_Channel.Name == "RBXGeneral" then continue end
if Loop_Channel.Name == "RBXSystem" then continue end -- Filter out channels we don't care about.
local Speaker = Loop_Channel:FindFirstChild(Players.LocalPlayer.Name)
if not Speaker then continue end -- If it's not us, we don't care either.
task.wait(1) -- Give the player a second to load in, or the message will never send.
Loop_Channel:DisplaySystemMessage("test") -- Finally, send the message.
-- Viola, notice the double space between [Team] and "test"? That's the issue.
-- You could optionally add a "break" here because players can be in more text channels at once if you added users through :AddUserAsync().
-- If you're doing this in an empty baseplate, you should only be in one text channel after all the filtering we did above.
end
Reproduction:
- Simply join the game with the script provided above. It happens both in Studio and published games.
- To compare the space between my “test” message and your own team chat message, simply text in team chat yourself after the test message sends.
Chat output:
File:
team chat bug report.rbxl (58.4 KB)
Expected behavior
I expect my message, whatever it is, to simply show up with ONE space between “[Team]” and my message. Not two.
