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

how do i kick player when selecting dialog choice?(my english is so bad sry)

local Dialog = game.Workspace.Gojo.Head.Dialog.DialogChoice.beforeoof.oof

Dialog.DialogChoiceSelected:Connect(function(Player, Choice)

Player:Kick()

end)

im getting error ;/

DialogChoiceSelected is not a valid member of DialogChoice "Workspace.Gojo.Head.Dialog.DialogChoice.beforeoof.oof" - Server - Script:3

1 answer

first of all, put your code in a code block :v

second, DialogChoiceSelected is an event for Dialogs, not DialogChoices.

game.Workspace.Gojo.Head.Dialog.DialogChoice.beforeoof.oof is a DialogChoice, game.Workspace.Gojo.Head.Dialog is the Dialog.

so, do this:

local Dialog = workspace.Gojo.Head.Dialog -- yes, you can just do workspace instead of game.Workspace but only for workspace.

Dialog.DialogChoiceSelected:Connect(function(plr, choice)
	if choice == Dialog.DialogChoice.beforeoof.oof then
		plr:Kick("insert kick message here")
	end
end)

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