Script killing player on DialogChoice doesnt work [?]
Asked by
2 years ago Edited 2 years ago
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
1 | local dialog = script.Parent |
3 | dialog.DialogChoiceSelected:connect( function (player, choice) |
4 | if choice = = script.Parent.Else.Else 1. Else 2. Else 3. SkyColor.A.Else 4. OwnerName.C.Fail 8 then |
5 | game.Players.LocalPlayer.Character.Humanoid.Health = 0 |
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.