DialogChoiceSelected doesn't do anything

For now, it’s supposed to print the option chosen’s name, but no errors or prints. I don’t see why it wouldn’t work, this is how I’ve seen it get done, but I’ve never used dialog before so maybe I’m mistaken. How do I actually get it to work? This is in a LocalScript, by the way.

local dialog = script.Parent.dialog

dialog.DialogChoiceSelected:connect(function(player,choice)
	if choice == dialog.chezburger then
		print("chezburger")
	elseif choice == dialog.fork then
		print("fork")
	elseif choice == dialog.soda then
		print("soda")
	end
end)

I’m assuming you put the LocalScript in workspace?

Switch it to a serverscript, or you can keep it as a LocalScript and keep it inside StarterPlayerScripts, StarterCharacterScripts or StarterGui and reference the main dialog instance through the workspace.