"Animating" text color on chats

I’ve got a bot (It’s a ChatSpeaker) that announces when players pick up a certain item, and after they pick up a certain amount, their text colour changes

i don’t know how to script the part where the colour changes, i’ve tried it with tweens but i can’t seem to get the property needed to change the text (i am not asking for a script, i want to know how this can be done)

Also, i’m concerned about what someone said in this post Can you create wavy rainbow chat tag on Roblox's default chat? - #11 by JackOfAllTrades101

They state that using RichText as a method will bypass filtering, but this was a year ago, so would this still affect the filtering system if i used it to animate player text?

i’ve heard of the following methods:

  • Tweens
  • UIGradient (i don’t know what this is)
  • RichText (Heard of it but never really touched on it)

which one would be the best to use in this scenario?

Rich text - I want the <font color="#FFA500">orange</font> candy. I want the <font color="rgb(255,165,0)">orange</font> candy.

See… Using Rich Text (roblox.com)

Oh, and you can filter text first before colorizing it… Text and Chat Filtering (roblox.com)

i see, would there be a way to make this animated though?

The link that you shared shows how to do it. The animated effect is achieved by having each character in the sequence take on the color of the previous one with a slight delay. This creates a wave of color, sort of like the wave done in a sports stadium. The wave is created by having people stand and then sit, but because they are all doing it in time sequence, it creates an animated wave.

The other thing that link shows is that the chat window on Roblox is just another ScreenGUI on the player’s Gui scripts, and each post is a text label, so you can drill down and change the text of any chat message, and in that way apply the animated effect. In order for you do achieve this effect you are going to have to use a meta tag on the text to indicate it should be animated. This is much like an HTML interpreter. If the chat bot produces the text “Player 1” then you write code to scan the chat for “” tag and strip it and do the animation on the text label. You will also need to filter players from chatting with the “” tag so that they cannot invoke the feature themselves.

So, you will three bits of script. One is the chatbot generating the tags (you have that), one is the filter that removes other player’s use of the “” tag, and the last is the script that watches the chat window text, looking for the “” tag and animating it when necessary.

1 Like