You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to be able to have multiple font colors inside one message. -
What is the issue? Include screenshots / videos if possible!
When I type in chat, this message shows and i’m not sure how to fix it
Here is my script:
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
local function Color(Status)
if Status == "Innocent" then
return Color3.fromRGB(255, 255, 255):ToHex()
end
end
TextChatService.OnIncomingMessage = function(Message)
local Properties = Instance.new("TextChatMessageProperties")
if Message.TextSource then
local Player = Players:GetPlayerByUserId(Message.TextSource.UserId)
local Status = Player.leaderstats.Status.Value
local Leaderspot = Player.Statistics.Leaderspot.Value
if Player.UserId == 1838222937 then
local Color = Color(Status)
Properties.PrefixText = string.format("<font color='ff0000'>[OWNER] </font><font color='#%s'>%s</font>", Color, Message.PrefixText)
end
return Properties
end