Skip to content

Commit 0410df7

Browse files
authored
Update TextChatService.yaml (#1016)
Fixed an inconsistency with [TextChatService:CanUserChatAsync()](https://create.roblox.com/docs/reference/engine/classes/TextChatService#CanUsersChatAsync). ## Changes TextChatService:CanUserChatAsync() can be used within local scripts, but only with the userId of the local player. Attempting to use this method with another player's userId (in the server or not) will result in this error: ![image](https://github.com/user-attachments/assets/357cc7f1-9780-474e-a1e6-6cdcdbaafe9c) Credit to [@xyrafrost](https://devforum.roblox.com/u/xyrafrost) for the [original bug report](https://devforum.roblox.com/t/feedback-on-textchatservice/3449366) regarding this inconsistency. ## Checks By submitting your pull request for review, you agree to the following: - [x] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [x] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [x] To the best of my knowledge, all proposed changes are accurate. ---------
1 parent 9f5d043 commit 0410df7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

content/en-us/reference/engine/classes/TextChatService.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,10 @@ methods:
311311
Determines whether a user has permission to chat in experiences. Factors
312312
such as parental control settings may prevent the user from sending
313313
messages. Errors if the userId is not in the current server. Note that
314-
this method is only available for use in a `Class.Script` with
315-
`Class.Script.RunContext|RunContext` of `Enum.RunContext.Server` or
316-
`Enum.RunContext.Legacy`.
314+
this method can be used with all current player `Class.Player.UserId|UserIds` in a `Class.Script`
315+
with `Class.Script.RunContext|RunContext` of `Enum.RunContext.Server` or
316+
`Enum.RunContext.Legacy`. This method can also be used in a `Class.LocalScript`
317+
but only with the `Class.Player.UserId|UserId` of the local player.
317318
code_samples: []
318319
parameters:
319320
- name: userId

0 commit comments

Comments
 (0)