Chattag problem

the tag only shows on the player with the title equipped, and for others screens it will only show the title that THEY have equipped

Player 1 with a title equipped
Screenshot 2024-01-20 155148

Player2 that doesnt have a title equipped
image_2024-01-20_155258398

local RS = game:GetService("ReplicatedStorage")
local TCS = game:GetService("TextChatService")

local TitleStats = require(RS:WaitForChild("Modules"):WaitForChild("TitleStats"))
local GetData = RS:WaitForChild("RemoteEvents"):WaitForChild("GetData")

TCS.OnIncomingMessage = function(msg)
	local props = Instance.new("TextChatMessageProperties")
	if msg.TextSource then
		local plr = game.Players:GetPlayerByUserId(msg.TextSource.UserId)
		local Title = GetData:InvokeServer(plr)["TitleStats"]["Equipped"]
		local Stats = TitleStats[Title]
		if Stats then
			props.PrefixText = [[<font color="]]..Stats["ChatColor"]..[[">]]..Stats["Text"]..[[</font> ]]..msg.PrefixText
		end
	end
	return props
end

I think the problem is your adding the title locally, that might be why the it is only showing the title to the player who equipped one.

1 Like

Yo, chat messages are kind of weird due to how you have to do them locally, I believe the best attempt would to fire to server and than on the server fire to all clients and each client then gets a clone of the props instance you made with the prefix (I don’t really use the chatservice but this should work).

1 Like

what do you mean? titles arent equipped locally

1 Like