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
 

Re: How do you detect some one dieing?

Previous Thread :: Next Thread 
darkwisp is not online. darkwisp
Joined: 07 Apr 2010
Total Posts: 22653
14 Oct 2013 02:37 PM
I want that to make my value decrease when some one dies.
--Darkwisp made this.
--Making some variables for VALUEs
ascore = game.StarterGui.ScreenGui.TEAMASCORE.Value.Value
bscore = game.StarterGui.ScreenGui.TEAMBSCORE.Value.Value
-- Making Value show on text.
game.StarterGui.ScreenGui.TEAMASCORE.Text = ascore
game.StarterGui.ScreenGui.TEAMBSCORE.Text = bscore



[::Fellow Renegades::] http://web.roblox.com/My/Groups.aspx?gid=757745
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
14 Oct 2013 02:40 PM
Died event on the Humanoid.

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character.Humanoid.Died:connect(function()
-- code here
end)
end)
end)
Report Abuse
darkwisp is not online. darkwisp
Joined: 07 Apr 2010
Total Posts: 22653
14 Oct 2013 02:54 PM
Now it works when I play but on test mode with my char, it does not want to work.
--Darkwisp made this.
--Making some variables for VALUE
ascore = game.StarterGui.ScreenGui.TEAMASCORE.Value.Value
bscore = game.StarterGui.ScreenGui.TEAMBSCORE.Value.Value
-- Making Value show on text.
game.StarterGui.ScreenGui.TEAMASCORE.Text = ascore
game.StarterGui.ScreenGui.TEAMBSCORE.Text = bscore

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
DEATH = character.Humanoid.Died:connect(function()
-- code here
if DEATH == true then
ascore = ascore -1
end
end)
end)
end)


[::Fellow Renegades::] http://web.roblox.com/My/Groups.aspx?gid=757745
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
14 Oct 2013 02:55 PM
PlayerAdded no worky on Solo.

Use Tools > Start Server then after that window Tools >Start Player instead I guess.
Report Abuse
darkwisp is not online. darkwisp
Joined: 07 Apr 2010
Total Posts: 22653
14 Oct 2013 03:07 PM
Thanks.

[::Fellow Renegades::] http://web.roblox.com/My/Groups.aspx?gid=757745
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