How I can make the TagColor rainbow (chat tags color)

I want to make something rainbow the problem is I cant make one loop or something? I can change his color yes but I cant make the RGB effect I tried to look how to make it in other posts and nothing.

local OwnerTag = {

	[660698828] = {
		ChatColor = Color3.new(255, 255, 255),
		Tags = {
			{TagText = "CREATOR", TagColor = Color3.fromRGB(255, 0, 4)}, --- this is the tagColor and I want to make it rainbow.
		}
	},
}
3 Likes

ok I did a loop inside it.
the script looks like this:

		Tags = {
			{TagText = "CREATOR", TagColor =
				while wait() do
					Color3.new(255/255,0/255,0/255)
					for i = 0,255,10 do	
						wait()
						Color3.new(255/255,i/255,0/255)
					end
					for i = 255,0,-10 do
						wait()
						Color3.new(i/255,255/255,0/255)
					end
					for i = 0,255,10 do
						wait()
						Color3.new(0/255,255/255,i/255)
					end
					for i = 255,0,-10 do
						wait()
						Color3.new(0/255,i/255,255/255)
					end
					for i = 0,255,10 do
						wait()
						Color3.new(i/255,0/255,255/255)	
					end
					for i = 255,0,-10 do
						wait()
						Color3.new(255/255,0/255,i/255)
					end
				end},
		  }
		}
	},
}


I only I have to fix one thing before test it but I am sure this can works.

1 Like

Without a custom chat module, I don’t think you can have a colour continuously changing. Ill look around for a bit anyways and get back to you

wait do I have to use a custon chat module?

To have it continuously changing, I believe so

Thats not how it works , you gotta update the color inside the while loop , the syntax you have right now is wrong.

while true do
 task.wait(n)  -- n is the time
 -- Update color
end

^ This is a small sample on how to do it. I would have a color variable and store the colors in VIBGYOR order then loop through it and lerp the color and apply it to the tag.

I can do that in other way like make one local function not inside it and make the loop and after I just make something like TagColor = “that local function”?

What exactly is the script using that tag table? Is it a custom chat you created, a free model or default roblox chat?

No idea what you are trying to tell

Sidenote : https://gyazo.com/4f99e69e2bd0ac9d33afe7432227f98f are you trying to achieve this?

Based on their provided code, I would say so.

In order to do it, you need a custom chat module, or you can try to modify the Roblox chat module to work

Yes is that what I trying to make.

Nope not necessary, you can just achieve it by changing the textlabel’s textcolor inside the chat slider frame.

But I can loop inside this and how I could get the textlabel in chat slider frame?

is something like this?

What I did was

  1. Get the the slider which is inside PlayerGui , the path is :
    Player → Chat → Frame → ChatChannelParentFrame → Frame_MessageLogDisplay → Scroller

  2. Create an array for storing all the textlabels

  3. Have a DescendantAdded listener to the scroller, detect when a TextLabel is added, now since your tag name is “CREATOR” check whether the text of the TextLabel is "[CREATOR] ",insert it to the array created in step 2.

  4. Have a while loop calculate the color and apply the TextColor of the textlabel or you can use a UIGradient and TweenService by avoiding step 2

but the playerGui you need to get from LocalPlayer and you cant use localplayer in main scripts

You have to handle this in a local script or you could use a different approach which does this in a server script if you know any

I dont really want to use one local script on this maybe I will keep with only one color.

I cant just make one local functions for and connect with the tagColor?

I don’t understand what you are trying to tell.