Background: So I'm making a game and when you go up to this npc and talk to him, and select the correct dialogs, it should provide a badge. I'm currently testing some code for this though. This is a LocalScript inside of StarterGui. The code:

local Tags = nil
for i,v in pairs(game.Workspace.LakeStuff:GetChildren()) do
	if v:IsA("Model") then
		Tags = v
	end
end
print(tostring(Tags.Parent.Name))
local dialog = Tags.Head.Dialog
dialog.DialogChoiceSelected:Connect(function(player, choice)
	if choice == dialog.DialogChoice.DialogChoice.DialogChoice.UserDialog then
		print("CorrectChoice")
	end
end)

The part up to print(tostring(Tags.Parent.Name)) works fine. The DialogChoiceSelected won't work though. Any fix to this, or am I even using the function right?

2 comments

0

Is this deprecated or something

0

(DialogChoiceSelected)