I'm making an npc for my game and I'm trying to make it so the player will be kicked if they choose a mean answer, I'm really new to scripting so if someone could just tell me the script that would help a lot! Tysm in advance
Hello,
You need to use DialogChoiceSelected.
Please read and understand what im about to tell you.
local Player = Instance.new("Player") -- Player function workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) --Make sure to say instead of "workspace" where the NPC actually is, if the NPC is located in Workspace, then leave the script like that. if choice.Name == "No, you suck" then --Change "No" with what the name of the Dialog is Player:Kick("Thats what you get for saying I suck") elseif choice.Name == "Yes, you're the best player ever" then --Change "Yes, you're the best player ever" To the name of the dialog choice player.Character.Humanoid.Health = 1000 end end)
Please reply to me when you have any questions, when the script isn't working, etc.