Ask a question!
Ep 48. Unreliable VIP Chat Message
The chat tag applied to VIP players is unreliably displayed.
Solution
Inside StarterPlayer/StarterPlayerScripts/VIP replace the TextChatService.MessageReceived code with the following:
Lua
TextChatService.OnIncomingMessage = function(textChatMessage: TextChatMessage)
local properties = Instance.new("TextChatMessageProperties")
local source = textChatMessage.TextSource
if source then
local userId = source.UserId
local isVIP = table.find(vipPlayers, userId)
if isVIP then
properties.PrefixText = `{CHAT_PREFIX_STRING} {textChatMessage.PrefixText}`
end
end
return properties
end