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

Why isn't DigalogChoiceSelected Working?

Asked by
Seyfert 90
8 years ago
local Dialog = script.Parent:WaitForChild("NPC").Head.Dialog
local vanilla = script.Parent.Vanilla
local ready = script.Parent.Ready

Dialog.DialogChoiceSelected:connect(function(Player, Choice)
    if Choice.Name == "May I take your order?" or Choice.Name == "What would you like today?" or Choice.Name == "Ready to order?" or Choice.Name == "I'm ready for your order" or Choice.Name == "Welcome, what would you like?" then        
        print("test")
    ready.Value = 1
    end
end)

Even though in the Dialog > DialogChoice > UserInput states one of those in the list I made above, nothing gets printed or the IntValue gets changed...why?

1 answer

Log in to vote
0
Answered by 8 years ago

I can't see what's wrong with the script. Is it in a local script or an original script? Where is the vanilla if you add a local and not use it, it may not work. Hope this helped :)

0
Figured out the problem, Choice.Name was actually the name of the DialogChoice, I thought Roblox/Roblox API made Choice.Name set to the UserDialog, I changed it to Choice.UserDialog and that made it work. Seyfert 90 — 8y
Ad

Answer this question