Skip to content

Commit b86663e

Browse files
authored
add info about runcontext to bubble chat docs (#908)
## Changes Adds info about using a `Script` with its `RunContext` set to `Client`, instead of just a `LocalScript`. ## 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 74703ae commit b86663e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/en-us/chat/bubble-chat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ end
439439

440440
You can display chat bubbles for non-player characters (NPCs) by calling `Class.TextChatService:DisplayBubble()`, with the NPC character and the message as parameters. These bubbles are customizable using the `Class.TextChatService.OnBubbleAdded` callback just like any other chat bubble.
441441

442-
`Class.TextChatService:DisplayBubble()` only works on client-side scripts, so be sure to use a `Class.LocalScript` in an [appropriate container](/projects/data-model#client), such as `Class.StarterPlayerScripts`. If you attach a `Class.ProximityPrompt` to an NPC, a script for displaying a chat bubble might look like this:
442+
`Class.TextChatService:DisplayBubble()` only works on client-side scripts, so be sure to use a `Class.Script` with `Class.BaseScript.RunContext|RunContext` set to `Enum.RunContext.Client`, or a `Class.LocalScript` in an [appropriate container](/projects/data-model#client), such as `Class.StarterPlayerScripts`. If you attach a `Class.ProximityPrompt` to an NPC, a script for displaying a chat bubble might look like this:
443443

444444
```lua
445445
local TextChatService = game:GetService("TextChatService")

0 commit comments

Comments
 (0)