Chat tags don't show up after player resets their character

I was writing a chat tag script and everything worked fine until I encountered a problem; everytime when a player gets their character reset the chat tag doesn’t show up anymore (Even if the player doesn’t get reset they still lose their chat tag after a few seconds have passed since they’ve joined)

Here’s how the code looks like (It’s a LocalScript inside of StarterGui):

game.TextChatService.OnIncomingMessage = function(msg)
	local plr = game.Players:GetPlayerByUserId(msg.TextSource.UserId)
	if plr.Name == "fghjkjhgtfrnhjj" then
		msg.PrefixText = `<font color='#000000'>[Owner]</font> {msg.PrefixText}`
	end
end

Any help would be appreciated

maybe user plr.Chatted in some way?

That event doesn’t work with TextChatService

So, I used your exact script and changed the name to my own in StarterGui.LocalScript and it works perfectly fine for me in a new workspace.

Have you tried testing it in an isolated environment?

I’ve also tested it in a baseplate template just now and it works (I don’t know why it doesn’t work in my own game though)

Yeah I’m not sure why this is.


Test2 was done after a reset (both characters), anything prior was done before a reset. Both clients can still see the chat tag so I’m not sure why you’re having this issue. Is your local script in a screengui?

1 Like

Turns out it was HD Admin tampering with my chat scripts (so that’s why it didn’t work)

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.