# Dialog

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/Dialog/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/Dialog

Creates NPC billboard-style dialog bubbles.

## Properties

### BehaviorType

```luau
Dialog.BehaviorType: Enum.DialogBehaviorType = Enum.DialogBehaviorType.SinglePlayer
```

- Tags: Read capabilities: UI

Sets whether the Dialog can be used by multiple players at once.

### ConversationDistance

```luau
Dialog.ConversationDistance: number = 25
```

- Tags: Read capabilities: UI

The furthest distance that a player can be from the Dialog's parent to start a conversation.

### GoodbyeChoiceActive

```luau
Dialog.GoodbyeChoiceActive: boolean = true
```

- Tags: Read capabilities: UI

Toggles whether the goodbye option will be displayed.

### GoodbyeDialog

```luau
Dialog.GoodbyeDialog: string = ""
```

- Tags: Read capabilities: UI

Sets the sentence that the dialog will show to the player when the chat ends.

### InitialPrompt

```luau
Dialog.InitialPrompt: string = ""
```

- Tags: Read capabilities: UI

Sets the first sentence that the dialog will show to the player, once a chat is commenced.

### InUse

```luau
Dialog.InUse: boolean = false
```

- Tags: Read capabilities: UI

If true, this dialog is being used by at least one player.

### Purpose

```luau
Dialog.Purpose: Enum.DialogPurpose = Enum.DialogPurpose.Help
```

- Tags: Read capabilities: UI

Sets the icon that the initial dialog displays.

### Tone

```luau
Dialog.Tone: Enum.DialogTone = Enum.DialogTone.Neutral
```

- Tags: Read capabilities: UI

Sets the color of the NPC's speech bubble.

### TriggerDistance

```luau
Dialog.TriggerDistance: number = 0
```

- Tags: Read capabilities: UI

Sets the maximum distance that a dialog can be triggered from.

### TriggerOffset

```luau
Dialog.TriggerOffset: Vector3 = Vector3.zero
```

- Tags: Read capabilities: UI

Sets the offset of the dialog relative to the dialog's parent.

## Methods

### GetCurrentPlayers

```luau
Dialog:GetCurrentPlayers(): { Instance }
```

- Tags: Capabilities: UI

Returns a list of players currently using the Dialog.

Returns: A list of [`Player`](https://rapi.sleaze.dev/classes/Player.md) objects currently engaged in the Dialog.

### SetGuiObject

```luau
Dialog:SetGuiObject(gui: BillboardGui)
```

- Tags: Roblox script security, Capabilities: UI

### SetPlayerIsUsing

```luau
Dialog:SetPlayerIsUsing(player: Instance, isUsing: boolean)
```

- Tags: Roblox script security, Capabilities: UI

### SignalDialogChoiceSelected

```luau
Dialog:SignalDialogChoiceSelected(player: Instance, dialogChoice: Instance)
```

- Tags: Roblox script security, Capabilities: UI

## Events

### DialogChoiceSelected

```luau
Dialog.DialogChoiceSelected: RBXScriptSignal<(player: Instance, dialogChoice: Instance)>
```

- Tags: Capabilities: UI

Fired when a player chooses something to say, through a [`Dialog`](https://rapi.sleaze.dev/classes/Dialog.md) instance.

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
