I’ve looked everywhere, and I can’t just find the script that creates the textlabel for the chat. I’m trying to do this so I can add a line that also enables RichText on the TextLabel.
Can anyone help?
I’ve looked everywhere, and I can’t just find the script that creates the textlabel for the chat. I’m trying to do this so I can add a line that also enables RichText on the TextLabel.
Can anyone help?
The scripts for the default Roblox chat are loaded into the CoreGui when a player joins a server. As such, these scripts cannot be edited in Studio and they cannot be replaced in running games, due to them being descendants of the CoreGui, which is only accessible to Plugins and CoreScripts. Thus, enabling RichText for the default Roblox chat is not currently possible, and the only way to accomplish what you are describing here is to use a custom chat system instead of the default Roblox chat.
Edit: My apologies for this ill - informed reply. After conducting a short test (that I should have done prior to posting), I found that, as @ArslanBakyl stated, the default Roblox chat scripts are not loaded into the CoreGui, but rather into the Chat; and, upon viewing the “Lua Chat System” article on the Developer Hub, I found that this change you are describing could be made very easily. Again, I would like to apologize for this reply and any confusion it may have caused.
Sure… I’m sure you can just do a for i loop to make every textlabel properties richtext enabled
Not very useful
First of all, I hope you are having a wonderful day. Unlike @usr_updated, I know this is possible with the default Roblox chat system that needs to be tweaked a little. Let us get started. First, you need to copy the default chat system, so run the game.
Once you run the game, you should see the default Roblox chat. Copy all of them, stop the game and paste it back in. After pasting it in you need to go to the script below.
Open the script and find the function called methods:CreateBaseMessage and add the line highlighted below.
And that’s it. The results:
There is also a way to enable rich text in the chatbox but I am going to leave that to you to find out if you cannot you can always ask me I will help you.
Hope that works for you. Have a great day.
Thank you so much! Now I know where it’s located and I can do more things with this information!
game.Players.LocalPlayer.CharacterAdded:Connect(function()
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", { Text ="Hello World!"})
end)
This code is a good example. This is a local script. Upon reading your code it looks like you have put it in a server script. If I am not mistaken you can only call the StarterGui:SetCore() from a local script.
There’s a small issue…
If your context text is too long, chat automatically cuts it off. Any way to prevent this?
Edit: I fixed it: