Hey guys! Actually made a script for my game which kills the player if the dialog choice but it seems to have an error Here's it by the way
local dialog = script.Parent--Or whatever the path is dialog.DialogChoiceSelected:connect(function(player, choice) --This is getting the service when the choice is selected if choice == script.Parent.Else.Else1.Else2.Else3.SkyColor.A.Else4.OwnerName.C.Fail8 then game.Players.LocalPlayer.Character.Humanoid.Health = 0 end end)
I had thoughts that its because the DialogChoice has two variables = UserDialog and ResponseDialog, but even if I am true, I have no ideas how to fix the script.
The script itself is located in the Dialog, not in any of the DialogChoices. Thank you scripters!
UPD.: Rewriting the script to LocalScript didn't help me.
Try doing instead of game.Players.LocalPlayer.Blah blah blah do player.Character.Humanoid.Health = 0. Hope this helps