Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't DialogChoiceSelected Working?

Asked by 5 years ago

HI, I made a script that will do something when a certaiin DialogChoice is selected. However, it did not work, so I made a test. Here is the LocalScript:

local dialog = script.Parent

dialog.DialogChoiceSelected:Connect(function(player,choice)
    print("A")
end)

I've tested it many times and so far it still didn't work.

Please Help!

1 answer

Log in to vote
1
Answered by 5 years ago

The LocalScript should not be parented to dialog, it should be somewhere on the client (for example, StarterPlayer>StarterPlayerScripts, or StarterCharacterScripts, or even in the StarterPack; it doesn't matter) Once you parent it there, your script should look something like this:

local dialog = workspace.Part.Dialog --Change this to where your dialog is located

dialog.DialogChoiceSelected:Connect(function(player,choice)
    print("a")
    --do stuff
end)

Ad

Answer this question