Skip to content

Commit 8c3511b

Browse files
authored
add info about runcontext to bubble chat docs
1 parent 8d61564 commit 8c3511b

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)