|
| 30 Jul 2012 06:38 PM |
Please help
workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) if choice.Name == "No" then player.Character.Humanoid.Health= 0 elseif choice.Name == "Yes" then player.Character.Humanoid.Health = 1000 end end)
|
|
|
| Report Abuse |
|
|
|
| 30 Jul 2012 06:40 PM |
| I think you have to specify player |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2012 06:42 PM |
| That doesnt work either, besides this script is ment to be for anyone who clicks, not one person |
|
|
| Report Abuse |
|
|
| |
|
dnd256
|
  |
| Joined: 24 Mar 2009 |
| Total Posts: 1373 |
|
|
| 30 Jul 2012 07:24 PM |
| What doesn't work? Can you provide the error? |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2012 07:31 PM |
The player is not dieing, the dialog works.
Sorry for not being specific |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2012 07:32 PM |
"workspace.Dialog"
You need to define which Part the Dialog is in. |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2012 07:50 PM |
| I dont understand why it works when I missed a thing like that e.o |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2012 07:51 PM |
| Dialog itself works no matter what, if You want something to happen when You Chat with Dialog, that's Where these Scripts come into Play. |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2012 08:00 PM |
| I added workspace.Sharpshooter26.Head yet it still does not kill me |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2012 08:05 PM |
| game.Players.player.Character, unless player was a short for that. |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2012 08:08 PM |
No I believe the script is whatever person that clicks the dialog gets killed.
It isnt for one specific player, if it isnt coded to do that, cacn you please tell me what a correct way would be? |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2012 08:41 PM |
the function returns the player who clicked it, and the choice that was made.
You would need to do player.Character.Humanoid to get to the humanoid.
|
|
|
| Report Abuse |
|
|