HOW TO CHANGE COLOR OF THE TEXT
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if string.sub(msg,1,3) == "/me" then
print(1)
end
end)
end)
HOW TO CHANGE COLOR OF THE TEXT
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if string.sub(msg,1,3) == "/me" then
print(1)
end
end)
end)
Color of what text? The color of the text in the chat or of a textlabel?
the color of the text in the chat
You’re gonna have to use TextChatService.OnIncomingMessage
(might only work for the new TextChatSystem not Legacy)
Look at the code snippet from a staff member
To add onto what @Doomcolp mentioned
local TextChatService = game:GetService("TextChatService")
TextChatService.OnIncomingMessage = function(textChatMessage)
if not textChatMessage.TextChannel then return nil end
if string.sub(textChatMessage.Text, 1, 3) == "/me" then
local overrideProperties = Instance.new("TextChatMessageProperties")
overrideProperties.Text = string.format("<font color='#555555'>%s</font>", textChatMessage.Text)
return overrideProperties
end
return nil
end
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.