I fixed this issue in a system fork that I made for nicknames. To ‘rename’ a ChatSpeaker, you’ll want to set some extra data called ‘DisplayName’.
You’ll need to fork the following scripts:
- DefaultChatMessage
(to fork the chat system, run the game and copy all the items in game.Chat, stop the game and paste it back into game.Chat)
Find the line that contains
local formatUseName = string.format("[%s]:", fromSpeaker)
and replace it with
local formatUseName
if extraData.DisplayName then --check if the user has a custom name
formatUseName = string.format("[%s]:", extraData.DisplayName) --set the name format to it
else
formatUseName = string.format("[%s]:", fromSpeaker) --else use their player name
end
Finally, set the extra data “DisplayName” and the name will appear in chat