When using StarterGui:SetCore("ChatMakeSystemMessage", configTable)
parts of messages are sometimes truncated. This bug has been around since at least August but I haven’t been able to reproduce it until now.
To repro the issue, put the following inside a local script in StarterPlayer and play in studio or online.
Warning: The usernames pulled from the site will rarely contain profanity, so do not test this in a public game.
function SpawnMessage(Message)
print("Spawning text with message: ", Message)
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = Message,
Color = Color3.new(1,1,1),
Font = Enum.Font.SciFi,
})
end
--Generate a list of random usernames to use
local L = 20
local UserNames = {}
for i = 1,L do
UserNames[i] = game.Players:GetNameFromUserIdAsync(math.random(1,10000000))
end
while true do
--Format the time
local Time = math.random() * 3000
local Minutes = math.floor(Time/60)
local Seconds = Time - Minutes*60
Seconds = math.floor(Seconds*100)/100
local Str = (Minutes<10 and "0" or "")..tostring(Minutes)..":"..(Seconds<10 and "0" or "")..tostring(Seconds)
--Create the message
local M = UserNames[math.random(1,L)].." finished 1st in RaceName with a time of: "..Str.."!"
SpawnMessage(M)
wait(0.8)
end
After about 20-30 or so messages, one of the message will be missing the time stamp and exclamation mark, but examination of the output will show that the full message was sent to :SetCore(). Calling SpawnMessage multiple times per loop with the same input will result in the message being cutoff identically for each call. For example:
-
The issue seemingly will not occur without randomising the username component, however the highly random nature of the issue makes it difficult to confirm with certainty.
-
If the string is sent to the client by the server, every player will see the text being cut-off
-
Using one of the previous cut-off messages as the only input does not cause the issue. (e.g. calling
SpawnMessage("black200 finished 1st in RaceName with a time of: 25:49.03!")
in a loop) -
The issue will occur with different patterns of strings created by concatenation, not just the example given here. I have experienced the same bug in a different game which featured an idea generator that concatenated different nouns, adjectives and sentence structures together into a new idea.
-
This issue also occurred for me in the past when using game.Chat:Chat(), but as bubble chat recently broke entirely it’s hard to say if the issues are related.
Edit: Changed title just to clarify that this is a different bug to the recent bubble chat issues