|
| 09 Jun 2017 01:25 AM |
okay, so i'm making this game and i made a dialog on an npc. i added 4 dialog choices in the dialog one of it is an insult so when the player click the insult dialogchoice he gets kicked
and i don't know how to script a player being kicked when he click on a certain dialogchoice.
can anyone help?
(i know this is against the rules but google didn't help.) |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2017 01:28 AM |
also i forgot to mention that the name of the dialogchoice with the insult is "insultdialogchoice" |
|
|
| Report Abuse |
|
|
Ossiehh
|
  |
| Joined: 29 Nov 2010 |
| Total Posts: 76 |
|
|
| 09 Jun 2017 03:50 AM |
workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) if choice.Name == "No" then -- Change the "No" to your dialog print("Wrong answer!") player:Kick("Wrong Answer!") -- kicks the player with a message of "Wrong Answer" elseif choice.Name == "Yes" then -- Change the "Yes" to your dialog print("Right answer!") end end)
wiki.roblox.com/index.php?title=Usage_of_dialogs
Never gonna give you up. Never gonna let you down. Never gonna run around and desert you. |
|
|
| Report Abuse |
|
|
|
| 15 Jun 2017 08:37 AM |
thanks man! time to go use this! |
|
|
| Report Abuse |
|
|