Dialog

Show Deprecated

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.

Summary

Properties

Methods

Events

Properties

Read Parallel

ConversationDistance

Read Parallel

GoodbyeChoiceActive

Read Parallel

GoodbyeDialog

Read Parallel

InUse

Read Parallel

InitialPrompt

Read Parallel
Read Parallel
Read Parallel

TriggerDistance

Read Parallel

TriggerOffset

Read Parallel

Methods

GetCurrentPlayers

Instances

Returns

Instances

Code Samples

Dialog:GetCurrentPlayers

local dialog = script.Parent
local function onChoiceSelected(_player, _choice)
local currentPlayers = dialog:GetCurrentPlayers()
print("The current players in the dialog:")
for _, player in ipairs(currentPlayers) do
print(player)
end
end
dialog.DialogChoiceSelected:Connect(onChoiceSelected)

Events

DialogChoiceSelected

Parameters

player: Instance
dialogChoice: Instance