I want a player who selects a dialog choice to be kicked once they select that choice, but I have no clue where to start. I've been searching online for a while but none of the codes seem to work.
local Dialog = script.Parent Dialog.DialogChoiceSelected:connect(function(Player, Choice) game.Players.LocalPlayer:Kick() end)
Tested your script. I think it's not working because LocalScripts don't run under dialogs. They only run under (from the wiki):
Or maybe DialogChoiceSelected doesn't work under local scripts but I think it's because of where you parent it.
This is actually easy to fix. Use a server (regular) script, and since DialogChoiceSelected
returns the player, we can use that to find and kick the player.
Here's what your script should look like :
local Dialog = script.Parent Dialog.DialogChoiceSelected:Connect(function(Player, Choice) Player:Kick() end) -- Note this kicks the player using the dialog when picking ANY choice
Hope this helps!