Rainbow chat tag not working

Hey! I tried a lot of different methods to make a rainbow chat tag, even on YouTube and DevForum, none of them worked. This is the current script I am trying and I’m having trouble with it.

				local tags = {
					{
						TagText = "🔨Owner", -- Tag
						TagColor = Color3.fromRGB(255, 0, 4) -- VIP Color
					}
				}

				local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner").ChatService)
				local speaker = nil
				while speaker == nil do
					speaker = ChatService:GetSpeaker(player.Name)
					if speaker ~= nil then break end
					wait(0.01)
				end
				speaker:SetExtraData("Tags",tags)
				speaker:SetExtraData("ChatColor",Color3.fromRGB(255, 0, 4)) -- Text Color
				speaker:SetExtraData("Font",26)
			    speaker:SetExtraData("NameColor",Color3.fromRGB(255, 0, 4))
			
			----------------------------------------------------
			local TweenService = game:GetService("TweenService")

			local part = tags.TagColor

			local tweenInfoColor = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0)```

			while wait(.001) do
				local randomColor = Color3.fromRGB( math.random(1, 255), math.random(1, 255), math.random(1, 255) )

				local tween = TweenService:Create(part, tweenInfoColor, {Color = randomColor  })
				tween:Play()

			end

In dev console it prints “TweenService:Create failed because Instance is null”. If anyone knows how to fix this or make something like this, please help me :slight_smile:

You cannot tween that directly, nor is it going to update in live-time if you’re expecting that.

  1. You could create a Color3Value and tween it, and change the tag color every time it changes?
  2. You could use my Chat+ module that got unlisted for some reason and do something like this
local chatPlus = require(...) -- path here
local owners = {
	[649136643] = true
}

local ownerTag = chatPlus:newTag({
	["rainbow"] = true,
	["tagText"] = "🔨Owner",
	["tagColor"] = Color3.fromRGB(255,255,0)
})

chatPlus:onPlayer(function(player)
	if owners[player.UserId] then
		ownerTag:assign(player)
	end
end)

Result: