So... I put a dialogue box on a NPC, and then i added a script into it. The main reason for i doing that was to make a specific dialogue choice move me to another place, but my script just don't work, i've tried everything.. Help please?
Script:
-- pizza is the name i've gave to the Dialogue Choice that was supposed to move me to another place
script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.DialogChoice.DialogChoice.DialogChoice.DialogChoice.pizza) then
player.Character:MoveTo(Vector3.new(19, 0.5, -65))
end
end)
Sorry for any grammar mistake.
Also i'm pretty new to Lua Scripting, so don't bully me, lol.

3 comments
I've made everything you told me to,but my script still doesn't work..i rewrited it, copy and pasted it, i even changed the Dialog's Choices name... But the result is exactly the same: Nothing happens. My Script: local dialog = workspace.It.Head:WaitForChild("pizza")
Try putting print("It's working") in the if statement, and look at the output when you click the dialog. And check if it says "It's working"
Nope, not even a word.