Chat tag problem

I Read an article about the new chat tag addition…So i tried to test it but apparently it isn’t working for me?
Script:

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

TextChatService.OnIncomingMessage = function(Msg : TextChatMessage)
	local Ppt = Instance.new("TextChatMessageProperties")
	local SpeakerMessage = Msg.TextSource
	if SpeakerMessage then
		print("Speaker is there")
		local Player = Players:GetPlayerByUserId(SpeakerMessage.UserId)
		Ppt.PrefixText = "<font color='#507af8'>[Developer]</font> "..Msg.PrefixText
	end
	return Ppt
end

Did you put this code in local script or server script?

Local Script…In starter player script

It should be in server-side script.

image
Yeah well tried that it shows this so I really don’t know why isn’t it working in either ways

Oh, sorry my bad. Does it print “Speaker is here!”? And try adding another print before if statement.

1 Like

So no the “speaker is here” doesn’t print nor when I added another print before the if statement

so actually here is the article:

It might give you some idea…Yet I don’t know what the problem is I am following everything it’s asking me to

Can you please record a video?

1 Like

You can try adding this code into a PlayerAdded event on the server. This is how I personally implement chat tags:

local Players = game:GetService("Players")

local developers = {
	YourUserId;
	SomeoneElsesUserId;
}

Players.PlayerAdded:Connect(function(player)
	local tags = Instance.new("Folder",player)
	tags.Name = "Tags"

	if table.find(developers, player.UserId) then
		local newTag = Instance.new("IntValue",tags)
		newTag.Name = "Developer"

		local chatColor = Instance.new("Color3Value",newTag)
		chatColor.Name = "ChatColor"
		chatColor.Value = Color3.fromRGB(85, 255, 0)

		local tagColor = Instance.new("Color3Value",newTag)
		tagColor.Name = "TagColor"
		tagColor.Value = Color3.fromRGB(253, 41, 67)
	end
end)

You’ll also need these chat modules:


Ungroup the model here:
image

1 Like

I can’t rn but just but just copy and paste the code in a Localsript inside starterplayerscript and and type stuff in chat u will see it doesn’t work nor does it print anything

1 Like

Oh yeah, and I just made the model very quickly from my own game. The chat font is a bit different.

If you want it back to normal, open the ClientChatModules folder, open the ChatSettings Module Script, and change line 38 and 39 to this:

module.DefaultFont = Enum.Font.SourceSansSemibold
module.ChatBarFont = Enum.Font.SourceSansSemibold
1 Like