How do you make a Ui gradient for chat tag

Hello there i am trying to make my chat tag with Ui Gradient colours. Any help/advice would be appreciated.Thanks!

CheckForChatTag = function(playerName)
		print(playerName)
		print("fired2")
		local chatService = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
		print("fired3")
		local speaker = chatService:GetSpeaker(playerName)
		local player = game.Players[playerName]
		local title = player.EquippedTitle.Value
		print(title)

		if title == "" then
			print("no equipped")
			speaker:SetExtraData("Tags")
		else
			local itemtitle = game.ReplicatedStorage.Titles[title]
			print(title)
			print(itemtitle.Name)
			speaker:SetExtraData("Tags",{{TagText = itemtitle.Name,TagColor = itemtitle.Frame.TextLabel.UIGradient.Color}})
			print("equipped titlechat")
		end

Chat is replicated to player when a player loads in in PlayerGui, have a localscript which waits for its existence then acts as a Handler for all new ChildAddeds to Scroller

image
When childadded to scroller use string.split() to get the players name and find the player instance associated or wherever you store data,
image

Then using UIGradient it really depends on how you want to style it, e.g do you just want the text to have a uigradient or do you want a frame to cover up the entire rectangle box of their input.

1 Like