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
1 post - 1 participant