The title explains it all. If you’re confused what I mean, I’m talking about this:
What I’m trying to do is make the name tag of anyone that joins to be lighter and softer looking so it is DEPENDING ON THEIR CURRENT COLOR. I’ve looked around YouTube and devforum for how to change the color but somehow no one has asked this question.
Nope, nothing I could find. Also just realized TextChatService I used OnIncomingMessage and it doesn’t print anything when I added a print inside the function
Are you using TextChatService or LegacyChatService?
Here’s the TextChatService method (LocalScript):
local tcs = game:GetService("TextChatService")
local players = game:GetService("Players")
local function onIncomingMessage(message:TextChatMessage)
--early return if it was a system message
if not message.TextSource then return nil end
--get the sender
local player = players:GetPlayerByUserId(message.TextSource.UserId)
--create properties for message
local properties = Instance.new("TextChatMessageProperties")
--set the colour (orange for example here)
properties.PrefixText = `<font color = "rgb(255, 170, 0)">[{player.Name}]:`
--return the properties to be used
return properties
end
--set the callback
tcs.OnIncomingMessage = onIncomingMessage
I didn’t include the thing about the colours, can you provide more information about that?
I’m not sure there is a way with LegacyChatService to get the current chat tag of a player. Even then, LegacyChatService is deprecated. I’d recommend converting to TextChatService, you are able to modify the chat font, etc. to suit your preferences.