Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why isn't DigalogChoiceSelected Working?

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

✓ Accepted answer

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 :)

1 comment

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.