Leone984
(Leone)
#1
Hello, I have a problem, I can not make a system message with the TextChatService. Could you help me? Thank you. Here’s my code:
local event = game.ReplicatedStorage.plrjoined
event.OnClientEvent:Connect(function(plr)
game:GetService("TextChatService"):SetAttribute("ChatMakeSystemMessage", {
Text = "Welcome, "..plr;
Font = Enum.Font.SourceSansBold;
TextSize = 17
Color = Color3.new(0, 0, 1)
})
end)
1 Like
Pinguch52
(Pinguch_Dev)
#3
Maybe you should try to Set a different way for the Player variable.
msix29
(msix29)
#4
Change it to your liking.
local event = game.ReplicatedStorage.plrjoined
event.OnClientEvent:Connect(function(plr)
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
Text = "[SYSTEM] welcome "..plr,
Color = Color3.fromRGB(255 , 0 , 0),
Font = Enum.Font.Arial,
FontSize = Enum.FontSize.Size24
})
end)
If you want to filter the text (in case you didn’t know what the message is)
local TextService = game:GetService("TextService")
local filteredTextResult = TextService:FilterStringAsync(text, userId)
Lokos
(Lokos)
#5
Since you’re using TextChatService, you’ll need to utalize the DisplaySystemMessage function
game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage("This is a message!", "SystemMessage")
3 Likes