Changing Chat Color

I Didn’t Work With Chat System Much so i need help,
how can i change color of text when a player chat? (not for everyone just per-player cuz im gonna do a gamepass system)

1 Like

Here

local ChatService= require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))

local devId = 0 -- user id

ChatService.SpeakerAdded:Connect(function(plrName)
	local speaker = ChatService(plrName)
	local player = game:GetService("Players")[plrName]

	
	if player.UserId == devId  then
		speaker:SetExtraData("Tags",{{TagText = "Dev", TagColor = Color3.fromRGB(255, 0, 0)}})
	end
end)


1 Like

i don’t need a tag i need to change text color

i found it out thx, i used

local chatService = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))


	
	
	chatService.SpeakerAdded:Connect(function(playerName)
		local speaker = chatService:GetSpeaker(playerName)
		local player = game.Players[playerName]
	local GamepassId = 47552773
	local MarketPlaceService = game:GetService("MarketplaceService")

	local PlayerBoughtThisGamePass =  MarketPlaceService:UserOwnsGamePassAsync(player.UserId, GamepassId)

	if  PlayerBoughtThisGamePass then
			speaker:SetExtraData("ChatColor", Color3.new(1, 0, 0.14902))
	end


	

	end)





2 Likes