Triggered a dialog

Hello! I would like to know if I can check when a dialog is triggered in order to run code.
Example:

local dialog = script.Parent
dialog.Triggered:Connect(function()
print("Triggered")
end)

God bless you. (Jesus died for us all, He’s God :smiley: )

Depends on how you use the dialog, if you use a Gui type you can use the MouseButton1Click:

TextButton.MouseButton1Click:Connect(function()
    print("start dialog")
end)

If you use a dialog on a npc, you can use Changed:

script.Parent.Changed:Connect(function()
    print("In use")
end)

It doesn’t work, it’s a dialog on an NPC

Use DialogChoiceSelected Dialog | Documentation - Roblox Creator Hub

Mhm, I found out, God bless you :smiley:
Btw, I’m having another issue
How can I prompt a user to send a friend request to a specific userId? If you know and reply, it would be greatly appreciated : D

Use PromptSendFriendRequest StarterGui | Documentation - Roblox Creator Hub

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.