Hi Creators,
This post is a follow-up to our announcement about the removal of the legacy chat system and the requirement for all creators to migrate to TextChatService by April 30th, 2025.
We’ve released a new TextChatService:CanUserDirectChatAsync API and we will release TextChannel:SetDirectChatRequester API, by November 15th, 2024. These APIs determine whether users can receive direct chats in experience, based on the user and parental control settings. Creators who have implemented direct chat in their experience using a custom chat or forked legacy chat system implementation are required to adopt one of these APIs by January 30th, 2025. Full details of the action you may need to take are in the table below.
Who needs to take action:
Type of direct chat implementation | Action required |
---|---|
1. Using default text channels in TextChatService | None |
2. Non-modified legacy chat systems |
By April 30, 2025 Migrate to TextChatService |
3. Either: a. Forked version of the legacy chat system b. Custom chat that does not use legacy chat system or TextChatService as its backend |
By January 30, 2025 Integrate TextChatService: CanUserDirectChatAsync API and check that Whisper and direct chats are gated by this method; OR Migrate to TextChatService By April 30, 2025 Migrate to TextChatService |
4. Using TextChatService with a custom implementation of direct chat outside of default text channels |
By January 30, 2025 Integrate TextChannel: SetDirectChatRequestor API |
Migrate to TextChatService Instead
We’ve made the TextChatService:CanUserDirectChatAsync API available as a transitional solution for creators who need more time to migrate to TextChatService. However, if you can, we recommend moving to TextChatService by January 30th, 2025 and integrating TextChannel:SetDirectChatRequester if necessary. Last week, we added two of the most requested features, Channel Tabs and UI Gradient to TextChatService. We’re continuing to invest in TextChatService, improving its performance and developing new features. TextChatService includes real-time chat translation which helps drive experience engagement.
What is direct chat?
Direct chat is a user-initiated chat that can only be seen by the users who initiated the chat, and the user who was requested to be in the chat. Chat is not visible to other users in the same experience. Whisper is one example of a user-initiated chat between two users since one user must initiate the chat with ‘/whisper
, ‘/w’
or even by clicking on another username in chat. Another example includes a phone messaging app where users can initiate direct conversations with other users.
DefaultTextChannels like General or Team channels are not considered direct chat.
Implementing the APIs
You need to use one of the below APIs for any use case for user A to send or receive direct chat messages with any other user (say user B) on the same server. These are the third and fourth use cases in the table above.
TextChatService:CanUserDirectChatAsync API
The TextChatService:CanUserDirectChatAsync API checks whether a user has permission to chat directly with other users in-experiences. You need to use this API if you are in the 3rd use case (forked legacy chat or custom chat that doesn’t use legacy chat system or TextChatService).
We will retroactively update the legacy chat system scripts to use this API for whisper chat.
local directChat = TextChatService:CanUsersDirectChatAsync(userA, {userB})
-- check if we have any eligible participants
if #directChat > 0 then
local directChannel = Instance.new("TextChannel")
for _, participant in party do
directChannel:AddUserAsync(participant)
end
return directChannel
end
warn("Could not create Direct TextChannel. Not enough eligible users")
return nil
TextChannel:SetDirectChatRequester API
TextChannel:SetDirectChatRequester sets TextChannel.DirectChannelRequester with the user who is initiating the direct chat. Any subsequent calls to TextChannel:AddUserAsync will check if the new user is allowed to direct chat with the requester. A similar check is performed before chats are delivered to participants. You need to use this API if you are in the 4th use case (creating custom direct chats in TextChatService that do not use the default or whisper channels).
local newTextChannel = Instance.new("TextChannel")
newTextChannel:SetDirectChatRequester(userA)
newTextChannel:AddUserAsync(userA.UserId)
newTextChannel:AdduserAsync(userB.UserId)
We’ve also released Experience Communication Guidelines to provide creators with best practices on how to offer in-experience chat.
We recognize this is a significant change. We appreciate your help to make chat on our platform safer. Please let us know if you have any questions.
Resources
- Announcement on Migrating to TextChatService
- Announcement on UIGradients and ChannelTabs for TextChatService
- Experience Communication Guidelines
- API Docs: TextChatService:CanUsersDirectChatAsync
- Legacy chat system documentation
- TextChatService documentation
FAQs
Do I need to implement any new APIs if I’m using the TextChatService and haven’t created any custom TextChannels?
- No, you do not have to take any action. The built-in direct chat (aka whisper) functionality for TextChatService supports the new user and parental control settings.
What happens if I do not adopt one of the APIs by January 30, 2025?
- If your experience falls into one of the categories above that requires adoption of either TextChatService:CanUserDirectChatAsync API or TextChannel:SetDirectChatRequester API and you do not do so by January 30th, in-experience chat may be disabled within your experience since it violates our Roblox Community Standards. Refer to the Experience Communication Guidelines to understand best practices for implementing TextChatService.
If I implement this API will I still have to migrate to TextChatService by April 30, 2025?
- Yes. We’re providing this API and a migration timeline to provide an interim solution for creators needing more time to migrate to TextChatService.
How do I know if I am using the standard version or forked version of legacy chat?
-
We will send an email and inbox message to all affected creators. Additionally, you can verify if you are using the standard unforked version by looking at your explorer and confirming that there aren’t any copies of ChatScript or ChatServiceRunner in Chat, StarterPlayerScripts, or ServerScriptService.
Additionally, check that the LoadDefaultChat toggle is set to “true,” as seen in the screenshot below.