10 min read

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

NameType / ReturnsDescription
Dialog.BehaviorTypeDialogBehaviorTypeSets whether the Dialog can be used by multiple players at once.
Dialog.ConversationDistancefloatThe furthest distance that a player can be from the Dialog's parent to start a conversation.
Dialog.GoodbyeChoiceActivebooleanToggles whether the goodbye option will be displayed.
Dialog.GoodbyeDialogstringSets the sentence that the dialog will show to the player when the chat ends.
Dialog.InitialPromptstringSets the first sentence that the dialog will show to the player, once a chat is commenced.
Dialog.InUsebooleanIf true, this dialog is being used by at least one player.
Dialog.PurposeDialogPurposeSets the icon that the initial dialog displays.
Dialog.ToneDialogToneSets the color of the NPC's speech bubble.
Dialog.TriggerDistancefloatSets the maximum distance that a dialog can be triggered from.
Dialog.TriggerOffsetVector3Sets the offset of the dialog relative to the dialog's parent.

Inherited from Instance

NameType / ReturnsDescription
Instance.ArchivablebooleanDetermines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published.
Instance.archivableboolean
Instance.CapabilitiesSecurityCapabilitiesThe set of capabilities allowed to be used for scripts inside this container.
Instance.IsInSandboxbooleanIndicates whether the instance is inside a sandboxed container.
Instance.NamestringA non-unique identifier of the Instance.
Instance.ParentInstanceDetermines the hierarchical parent of the Instance.
Instance.PredictionModePredictionModeReflects the client-side prediction mode applied to the instance under server-authoritative physics.
Instance.RobloxLockedbooleanA deprecated property that used to protect CoreGui objects.
Instance.SandboxedbooleanWhen enabled, the instance can only access abilities in its Capabilities list.
Instance.UniqueIdUniqueIdA unique identifier for the instance.

Inherited from Object

NameType / ReturnsDescription
Object.ClassNamestringA read-only string representing the class this Object belongs to.
Object.classNamestring

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.

FieldValue
typeDialogBehaviorType
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
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.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
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.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
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.

FieldValue
typestring
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
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.

FieldValue
typestring
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
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.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
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:

Default is Help.

FieldValue
typeDialogPurpose
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
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:

Default is Neutral.

FieldValue
typeDialogTone
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
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.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
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).

FieldValue
typeVector3
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":true,"can_save":true}
capabilities["UI"]

Methods

NameType / ReturnsDescription
Dialog:GetCurrentPlayersInstancesReturns a list of players currently using the Dialog.

Inherited from Instance

NameType / ReturnsDescription
Instance:AddTag()Applies a tag to the instance.
Instance:childrenInstancesReturns an array of the object's children.
Instance:ClearAllChildren()This method destroys all of an instance's children.
Instance:CloneInstanceCreate a copy of an instance and all its descendants, ignoring instances that are not Archivable.
Instance:cloneInstance
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:FindFirstAncestorInstance?Returns the first ancestor of the Instance whose Instance.Name is equal to the given name.
Instance:FindFirstAncestorOfClassInstance?Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className.
Instance:FindFirstAncestorWhichIsAInstance?Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstChildInstance?Returns the first child of the Instance found with the given name.
Instance:findFirstChildInstance
Instance:FindFirstChildOfClassInstance?Returns the first child of the Instance whose ClassName is equal to the given class name.
Instance:FindFirstChildWhichIsAInstance?Returns the first child of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstDescendantInstance?Returns the first descendant found with the given Instance.Name.
Instance:GetActorActor?Returns the Actor associated with the Instance, if any.
Instance:GetAttributeVariantReturns the value which has been assigned to the given attribute name.
Instance:GetAttributeChangedSignalRBXScriptSignalReturns an event that fires when the given attribute changes.
Instance:GetAttributesDictionaryReturns a dictionary of the instance's attributes.
Instance:GetChildrenInstancesReturns an array containing all of the instance's children.
Instance:getChildrenInstances
Instance:GetDebugIdstringReturns a coded string of the debug ID used internally by Roblox.
Instance:GetDescendantsInstancesReturns an array containing all of the descendants of the instance.
Instance:GetFullNamestringReturns a string describing the instance's ancestry.
Instance:GetStyledVariantReturns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified.
Instance:GetStyledPropertyChangedSignalRBXScriptSignalReturns an event that fires when the given style property changes on the instance.
Instance:GetTagsArrayGets an array of all tags applied to the instance.
Instance:HasTagbooleanCheck whether the instance has a given tag.
Instance:IsAncestorOfbooleanReturns true if an Instance is an ancestor of the given descendant.
Instance:IsDescendantOfbooleanReturns true if an Instance is a descendant of the given ancestor.
Instance:isDescendantOfboolean
Instance:IsPropertyModifiedbooleanReturns true if the value stored in the specified property is not equal to the code-instantiated default.
Instance:QueryDescendantsInstancesReturns 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:WaitForChildInstanceReturns 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

NameType / ReturnsDescription
Object:GetPropertyChangedSignalRBXScriptSignalGet an event that fires when a given property of the object changes.
Object:IsAbooleanReturns true if an object's class matches or inherits from a given class.
Object:isAboolean

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

TypeDescription
InstancesA list of Player objects currently engaged in the Dialog.
FieldValue
securityNone
thread safetyUnsafe
capabilities["UI"]

Code samples: View on Creator Hub (Dialog-GetCurrentPlayers1).

Events

NameType / ReturnsDescription
Dialog.DialogChoiceSelectedFired when a player chooses something to say, through a Dialog instance.

Inherited from Instance

NameType / ReturnsDescription
Instance.AncestryChangedFires when the Instance.Parent property of this object or one of its ancestors is changed.
Instance.AttributeChangedFires whenever an attribute is changed on the Instance.
Instance.ChildAddedFires after an object is parented to this Instance.
Instance.childAdded
Instance.ChildRemovedFires after a child is removed from this Instance.
Instance.DescendantAddedFires after a descendant is added to the Instance.
Instance.DescendantRemovingFires immediately before a descendant of the Instance is removed.
Instance.DestroyingFires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy().
Instance.StyledPropertiesChangedFires whenever any style property is changed on the instance, including when a property is set to nil.

Inherited from Object

NameType / ReturnsDescription
Object.ChangedFires 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

NameTypeDefaultDescription
playerInstanceThe Player who made the selection.
dialogChoiceInstanceThe DialogChoice that was selected by the player.
FieldValue
securityNone
capabilities["UI"]