Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
Dialog
Inherits from: Instance → Object
The Dialog object allows users to create non-player characters (NPCs) that players can talk to using a list of choices. The Dialog object can be inserted into a part such as a Humanoid's head, and then a player will see a speech bubble above the part that they can click on to start a conversation. The creator of a place can choose what choices the player can say by inserting DialogChoice objects into the dialog.
Inherits from: Instance
Memory category: Instances
Properties
| Name | Type / Returns | Description |
|---|---|---|
| Dialog.BehaviorType | DialogBehaviorType | Sets whether the Dialog can be used by multiple players at once. |
| Dialog.ConversationDistance | float | The furthest distance that a player can be from the Dialog's parent to start a conversation. |
| Dialog.GoodbyeChoiceActive | boolean | Toggles whether the goodbye option will be displayed. |
| Dialog.GoodbyeDialog | string | Sets the sentence that the dialog will show to the player when the chat ends. |
| Dialog.InitialPrompt | string | Sets the first sentence that the dialog will show to the player, once a chat is commenced. |
| Dialog.InUse | boolean | If true, this dialog is being used by at least one player. |
| Dialog.Purpose | DialogPurpose | Sets the icon that the initial dialog displays. |
| Dialog.Tone | DialogTone | Sets the color of the NPC's speech bubble. |
| Dialog.TriggerDistance | float | Sets the maximum distance that a dialog can be triggered from. |
| Dialog.TriggerOffset | Vector3 | Sets the offset of the dialog relative to the dialog's parent. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.Archivable | boolean | Determines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published. |
| Instance.archivable | boolean | |
| Instance.Capabilities | SecurityCapabilities | The set of capabilities allowed to be used for scripts inside this container. |
| Instance.IsInSandbox | boolean | Indicates whether the instance is inside a sandboxed container. |
| Instance.Name | string | A non-unique identifier of the Instance. |
| Instance.Parent | Instance | Determines the hierarchical parent of the Instance. |
| Instance.PredictionMode | PredictionMode | Reflects the client-side prediction mode applied to the instance under server-authoritative physics. |
| Instance.RobloxLocked | boolean | A deprecated property that used to protect CoreGui objects. |
| Instance.Sandboxed | boolean | When enabled, the instance can only access abilities in its Capabilities list. |
| Instance.UniqueId | UniqueId | A unique identifier for the instance. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.ClassName | string | A read-only string representing the class this Object belongs to. |
| Object.className | string |
Dialog.BehaviorType
The BehaviorType of a Dialog determines whether multiple players can interact with a dialog at once. The default value for this property is SinglePlayer.
SinglePlayer
When a Dialog is configured to SinglePlayer, only one player can interact with it at a time. As soon as a player engages with a dialog, other players will not be able to initiate the dialog until the first player is finished.
While a player is engaged with a dialog, the other players will see the dialog choices of the player who started the dialog, along with the responses.
MultiplePlayers
When a Dialog is set to MultiplePlayers, any player can initiate a dialog at any time, even if another player has already initiated the dialog. Unlike SinglePlayer however, Dialogs set to MultiplePlayers will not show the dialog choices and responses to anyone but the player in the conversation.
| Field | Value |
|---|---|
| type | DialogBehaviorType |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
Code samples: View on Creator Hub (Dialog-BehaviorType).
Dialog.ConversationDistance
The maximum distance in studs between the player's character and the Dialog's parent BasePart at which the player can click on the speech bubble to begin or continue a conversation. If the player moves further than this distance from the parent part, they cannot initiate the dialog. The engine uses this value to select the nearest available Dialog when multiple are in range.
Default is 25.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
Dialog.GoodbyeChoiceActive
Toggles whether the goodbye option will be displayed. If true, the dialog will display the content of Dialog.GoodbyeDialog as the last option after other dialog choices. Clicking on the goodbye option will exit the dialog.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
Dialog.GoodbyeDialog
The text displayed as the goodbye option at the bottom of the dialog choices list. When Dialog.GoodbyeChoiceActive is true, this string appears as the final selectable choice; clicking it ends the conversation. When Dialog.GoodbyeChoiceActive is false, this property has no visible effect.
Default is an empty string.
| Field | Value |
|---|---|
| type | string |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
Dialog.InitialPrompt
The text that the NPC displays inside the speech bubble when a player first begins the conversation. This is the opening line that appears before the player selects from DialogChoice options nested under this Dialog.
Default is an empty string.
| Field | Value |
|---|---|
| type | string |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
Dialog.InUse
A read-only runtime indicator that is true whenever at least one player is currently engaged in this dialog conversation. The engine sets this to true when a player begins talking and resets it to false when all participants leave. This property is not serialized and always starts as false when the place loads. Scripts can read this property but cannot set it directly.
Default is false.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":false,"can_save":false} |
| capabilities | ["UI"] |
Dialog.Purpose
Controls which icon appears on the dialog's speech bubble indicator. Accepts a value from the DialogPurpose enum:
- Quest -- displays an exclamation mark (!)
- Help -- displays a question mark (?)
- Shop -- displays a dollar sign ($)
Default is Help.
| Field | Value |
|---|---|
| type | DialogPurpose |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
Dialog.Tone
Controls the color accent on the dialog's speech bubble. Accepts a value from the DialogTone enum:
- Neutral -- blue accent bar
- Friendly -- green accent bar
- Enemy -- red accent bar
Default is Neutral.
| Field | Value |
|---|---|
| type | DialogTone |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
Dialog.TriggerDistance
The maximum distance in studs from the Dialog's parent BasePart at which the dialog's trigger indicator becomes visible to a player. When a player's character is within this distance, the speech bubble icon appears over the parent part, inviting interaction. The value is clamped between 0 and 400.
Default is 0, which effectively disables the distance-based trigger indicator; the player must be within Dialog.ConversationDistance to see and interact with the dialog.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
Dialog.TriggerOffset
A Vector3 offset in studs that shifts the position of the dialog's speech bubble indicator relative to the Dialog's parent BasePart. Use this to position the indicator above or beside the NPC rather than at the part's center. This property participates in model scaling.
Default is (0, 0, 0).
| Field | Value |
|---|---|
| type | Vector3 |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
Methods
| Name | Type / Returns | Description |
|---|---|---|
| Dialog:GetCurrentPlayers | Instances | Returns a list of players currently using the Dialog. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance:AddTag | () | Applies a tag to the instance. |
| Instance:children | Instances | Returns an array of the object's children. |
| Instance:ClearAllChildren | () | This method destroys all of an instance's children. |
| Instance:Clone | Instance | Create a copy of an instance and all its descendants, ignoring instances that are not Archivable. |
| Instance:clone | Instance | |
| Instance:Destroy | () | Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children. |
| Instance:destroy | () | |
| Instance:FindFirstAncestor | Instance? | Returns the first ancestor of the Instance whose Instance.Name is equal to the given name. |
| Instance:FindFirstAncestorOfClass | Instance? | Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className. |
| Instance:FindFirstAncestorWhichIsA | Instance? | Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstChild | Instance? | Returns the first child of the Instance found with the given name. |
| Instance:findFirstChild | Instance | |
| Instance:FindFirstChildOfClass | Instance? | Returns the first child of the Instance whose ClassName is equal to the given class name. |
| Instance:FindFirstChildWhichIsA | Instance? | Returns the first child of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstDescendant | Instance? | Returns the first descendant found with the given Instance.Name. |
| Instance:GetActor | Actor? | Returns the Actor associated with the Instance, if any. |
| Instance:GetAttribute | Variant | Returns the value which has been assigned to the given attribute name. |
| Instance:GetAttributeChangedSignal | RBXScriptSignal | Returns an event that fires when the given attribute changes. |
| Instance:GetAttributes | Dictionary | Returns a dictionary of the instance's attributes. |
| Instance:GetChildren | Instances | Returns an array containing all of the instance's children. |
| Instance:getChildren | Instances | |
| Instance:GetDebugId | string | Returns a coded string of the debug ID used internally by Roblox. |
| Instance:GetDescendants | Instances | Returns an array containing all of the descendants of the instance. |
| Instance:GetFullName | string | Returns a string describing the instance's ancestry. |
| Instance:GetStyled | Variant | Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. |
| Instance:GetStyledPropertyChangedSignal | RBXScriptSignal | Returns an event that fires when the given style property changes on the instance. |
| Instance:GetTags | Array | Gets an array of all tags applied to the instance. |
| Instance:HasTag | boolean | Check whether the instance has a given tag. |
| Instance:IsAncestorOf | boolean | Returns true if an Instance is an ancestor of the given descendant. |
| Instance:IsDescendantOf | boolean | Returns true if an Instance is a descendant of the given ancestor. |
| Instance:isDescendantOf | boolean | |
| Instance:IsPropertyModified | boolean | Returns true if the value stored in the specified property is not equal to the code-instantiated default. |
| Instance:QueryDescendants | Instances | Returns an array containing all descendants of the instance that match the selector string. |
| Instance:Remove | () | Sets the object's Parent to nil, and does the same for all its descendants. |
| Instance:remove | () | |
| Instance:RemoveTag | () | Removes a tag from the instance. |
| Instance:ResetPropertyToDefault | () | Resets a property to its default value. |
| Instance:SetAttribute | () | Sets the attribute with the given name to the given value. |
| Instance:WaitForChild | Instance | Returns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object:GetPropertyChangedSignal | RBXScriptSignal | Get an event that fires when a given property of the object changes. |
| Object:IsA | boolean | Returns true if an object's class matches or inherits from a given class. |
| Object:isA | boolean |
Dialog:GetCurrentPlayers
The GetCurrentPlayers function of a Dialog will return a list of Player currently using the Dialog. If there are no players using the dialog then the returned list will be empty.
Returns
| Type | Description |
|---|---|
| Instances | A list of Player objects currently engaged in the Dialog. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["UI"] |
Code samples: View on Creator Hub (Dialog-GetCurrentPlayers1).
Events
| Name | Type / Returns | Description |
|---|---|---|
| Dialog.DialogChoiceSelected | Fired when a player chooses something to say, through a Dialog instance. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.AncestryChanged | Fires when the Instance.Parent property of this object or one of its ancestors is changed. | |
| Instance.AttributeChanged | Fires whenever an attribute is changed on the Instance. | |
| Instance.ChildAdded | Fires after an object is parented to this Instance. | |
| Instance.childAdded | ||
| Instance.ChildRemoved | Fires after a child is removed from this Instance. | |
| Instance.DescendantAdded | Fires after a descendant is added to the Instance. | |
| Instance.DescendantRemoving | Fires immediately before a descendant of the Instance is removed. | |
| Instance.Destroying | Fires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy(). | |
| Instance.StyledPropertiesChanged | Fires whenever any style property is changed on the instance, including when a property is set to nil. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.Changed | Fires immediately after a property of the object changes, with some limitations. |
Dialog.DialogChoiceSelected
Fired when a player chooses something to say, through a Dialog instance.
This event is client-side only and will not fire on the server. It should be connected to in either a LocalScript or a ModuleScript required by a LocalScript.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| player | Instance | The Player who made the selection. | |
| dialogChoice | Instance | The DialogChoice that was selected by the player. |
| Field | Value |
|---|---|
| security | None |
| capabilities | ["UI"] |