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

Roblox DialougeChoiceSelected Event Help?

Asked by 6 years ago

Hai! I basically am making it so that when someone clicks a certain dialoguechoice, they get the item. My issue is the event. I realized that the event must connect with the dialogue and not the dialoguechoice. This has me confused because there are multiple dialoguechoices they must select from. Help please. Thanks!

0
basically need an explanation im not asking for a free script thx DaWarTekWizard 169 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Basically, the choice they selected is passed through a parameter so you could use this to check what they have chosen and run your script.

script.Parent.Dialog.DialogChoiceSelected:Connect(function(plr,choice)
    if choice == script.Parent.Dialog.Shop2 then -- change Shop2 to the name of your dialoge
        print('They have chosen shop2') -- change this to your code
    end
    if choice == script.Parent.Dialog.Shop1 then
        print('they have chosen shop1')
    end
end)

Consider accepting this answer if it helped you as it will give us both reputation.

0
ohh i get it thanks! dont worry i always give +rep xD DaWarTekWizard 169 — 6y
Ad

Answer this question