generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

This will not work

Previous Thread :: Next Thread 
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
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
TheEpicSamuri is not online. TheEpicSamuri
Joined: 04 Dec 2011
Total Posts: 1343
30 Jul 2012 06:40 PM
I think you have to specify player
Report Abuse
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
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
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
30 Jul 2012 07:08 PM
Bump..
Report Abuse
dnd256 is not online. 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
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
30 Jul 2012 07:31 PM
The player is not dieing, the dialog works.

Sorry for not being specific
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
30 Jul 2012 07:32 PM
"workspace.Dialog"

You need to define which Part the Dialog is in.
Report Abuse
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
30 Jul 2012 07:50 PM
I dont understand why it works when I missed a thing like that e.o
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
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
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
30 Jul 2012 08:00 PM
I added workspace.Sharpshooter26.Head yet it still does not kill me
Report Abuse
TrueSoulWolf is not online. TrueSoulWolf
Joined: 02 Apr 2011
Total Posts: 460
30 Jul 2012 08:05 PM
game.Players.player.Character, unless player was a short for that.
Report Abuse
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
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
WhoBloxedWho is online. WhoBloxedWho
Joined: 25 Mar 2009
Total Posts: 4611
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image