TextChatService

Show Deprecated
Not Creatable
Service

A service handling in-experience text chat, including managing channels, decorating messages, filtering text, creating commands, and developing custom chats interfaces.

To learn more, see TextChatService Overview.

For further customization, TextChatService has the following singleton children:

Summary

Properties

Methods

Events

Callbacks

Properties

ChatTranslationEnabled

Not Replicated
Roblox Script Security
Read Parallel

ChatVersion

Roblox Script Security
Read Parallel

CreateDefaultCommands

Plugin Security
Read Parallel

CreateDefaultTextChannels

Plugin Security
Read Parallel

Methods

CanUserChatAsync

Yields

Parameters

userId: number

Returns

CanUsersChatAsync

Yields

Parameters

userIdFrom: number
userIdTo: number

Returns

CanUsersDirectChatAsync

Yields

Parameters

requesterUserId: number
userIds: Array

Returns

Code Samples

CanUsersDirectChatAsync

local TextChatService = game:GetService("TextChatService")
local directChatParticipants = TextChatService:CanUsersDirectChatAsync(userId1, { userId2 })
-- Check for eligible participants
if #directChatParticipants > 0 then
local directChannel = Instance.new("TextChannel")
directChannel.Parent = TextChatService
for _, participant in directChatParticipants do
directChannel:AddUserAsync(participant)
end
return directChannel
end
warn("Could not create TextChannel. Not enough eligible users.")
return nil

DisplayBubble

()

Parameters

partOrCharacter: Instance
message: string

Returns

()

Events

BubbleDisplayed

Parameters

partOrCharacter: Instance
textChatMessage: TextChatMessage

MessageReceived

Parameters

textChatMessage: TextChatMessage

SendingMessage

Parameters

textChatMessage: TextChatMessage

Callbacks

OnBubbleAdded

Parameters

adornee: Instance

Returns

OnChatWindowAdded

Parameters


Returns

OnIncomingMessage

Parameters


Returns