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

dialog killscript does not kill?

script.Parent.DialogChoiceSelected:Connect(function(Dialog)
	if Dialog.Name == 'talk2' then
		if Dialog.Parent:findFirstChild("Humanoid") then
			Dialog.Parent.Humanoid.Health = 0
		end
	end
end)

there are two dialog choices, one of them being talk2

how does one make the dialog script kill?

edit: due to the new fe implementation into all roblox games, the script is not fe compatible.

1 comment

0

Try using FindFirstChild() Instead of findFirstChild()

1 answer

###This is because the first parameter to DialogChoiceSelected is the player that selected the dialog.

script.Parent.DialogChoiceSelected:Connect(function(Player, Dialog)
    if Dialog.Name == 'talk2' then
        Player.Character.Humanoid.Health = 0
    end
end)

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