This script bugs my chat

im trying to use this scipt to create tags for my chat, it works, but messages can only be viewed locally so you can’t see others’ chats

local TextChatService = game:GetService("TextChatService")
local MarketplaceService = game:GetService("MarketplaceService")

local ranks = {}

game.ReplicatedStorage.Remotes.SendRanks.OnClientEvent:Connect(function(Ranks)
	ranks = Ranks
end)
local rankTag = function(rank: number)
	if type(rank) ~= "number" then return end
	if rank > 50 then
		return ""
	end
	return "<font color='#42caff'>[#"..rank.."] </font>"
end
TextChatService.OnIncomingMessage = function(message: TextChatMessage)
	local player = game:GetService("Players"):GetPlayerByUserId(message.TextSource.UserId)
	local properties = Instance.new("TextChatMessageProperties")
	if message.TextSource then
		local vipTag = ""
		if MarketplaceService:UserOwnsGamePassAsync(message.TextSource.UserId, 19774246) then
			vipTag = "<font color='#f0f00a'>VIP 👑 </font>"
		end
		--print(rankTag(ranks[message.TextSource.Name]), vipTag, player.Name)
		properties.PrefixText =  rankTag(ranks[message.TextSource.Name])..vipTag.."<font color='#ffffff'>["..player.Name.."]: </font>"
	end
	return properties
end