Im attempting to modify other properties of a system message other than its text (Color for instance), but I don’t know how and the documentation doesnt show any way to do so.
In this one, I’m not sure if there is a way to properly do that. If you didn’t care about which text channel the system message was in, you could use ChatMakeSystemMessage. For the documentation, scroll down this page StarterGui | Roblox Creator Documentation
Done some more digging, found there is a way to do so:
local m = game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage('asdasd123').MessageId
game.CoreGui.ExperienceChat.appLayout.chatWindow.scrollingView.bottomLockedScrollView.scrollingFrame:WaitForChild(m).TextColor3 = Color3.fromRGB(101, 227, 255)
it only works as a command line and not in a script
In your case, it sounds like you want to have a specific color for your “Hello” system message. In this case, I’d recommend using the second optional argument, metadata of DisplaySystemMessage to attach a unique ID for your system messages. You can then use the metadata property in your OnIncomingMessage callback like this:
TextChatService.OnIncomingMessage = function(textChatMessage)
if textChatMessage.Metadata == "hello" then
local overrideProperties = Instance.new("TextChatMessageProperties")
overrideProperties.Text = string.format("<font color='#FF0000'>%s</font>", textChatMessage.Text)
return overrideProperties
else
-- do nothing
return nil
end
end
RBXGeneral:DisplaySystemMessage("Hello there!", "hello")
RBXGeneral:DisplaySystemMessage("Hola!", "hello")