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 » Scripters
Home Search
 

Re: How do I detect if someone's dead?

Previous Thread :: Next Thread 
Zeyadism is not online. Zeyadism
Joined: 07 Sep 2015
Total Posts: 11
15 Mar 2016 08:37 PM
Current code:

#code plaay = script.Parent.Parent.Killer.Value

game.Workspace[plaay].Changed:connect(function()
script.Parent.Value = true
end)


I ᴄᴀɴᴛ ᴅʀᴏᴡɴ ᴍʏ ᴅᴇᴍᴏɴs ᴛʜᴇʏ ᴋɴᴏᴡ ʜᴏᴡ ᴛᴏ sᴡɪᴍ
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
15 Mar 2016 08:45 PM
One of the easiest ways, if you want this to be for a round thing, at the start of the round create objectvalues or whatever values inside each player's humanoid. Name it something like 'ThisPlrIsAlive'

when the player dies that value will automatically remove itself. Check to see if it exists in the humanoid or not. If it exists, the player is alive. If it doesn't, they must have died.
Report Abuse
fixylol is not online. fixylol
Joined: 14 Dec 2012
Total Posts: 7412
15 Mar 2016 08:47 PM
@62GB i think a somewhat easier solution would be to make a boolvalue and set the value of that boolvalue to false when the player dies

Number of times opinion has changed: A lot.
Report Abuse
Zeyadism is not online. Zeyadism
Joined: 07 Sep 2015
Total Posts: 11
15 Mar 2016 08:47 PM
Let me mess with some stuff that might work with my level of scripting.


I ᴄᴀɴᴛ ᴅʀᴏᴡɴ ᴍʏ ᴅᴇᴍᴏɴs ᴛʜᴇʏ ᴋɴᴏᴡ ʜᴏᴡ ᴛᴏ sᴡɪᴍ
Report Abuse
Zeyadism is not online. Zeyadism
Joined: 07 Sep 2015
Total Posts: 11
15 Mar 2016 08:49 PM
And fixy thats what I tried to do but it didn't work in the script above


I ᴄᴀɴᴛ ᴅʀᴏᴡɴ ᴍʏ ᴅᴇᴍᴏɴs ᴛʜᴇʏ ᴋɴᴏᴡ ʜᴏᴡ ᴛᴏ sᴡɪᴍ
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
15 Mar 2016 08:50 PM
@fixy

Not sure if you're trolling me or...

But it's ALOT easier and efficient to create a value in the humanoid. Then you don't have to do anything with the Died event. It does it for you. When the player respawns, the value is removed.
Report Abuse
antonio6643 is not online. antonio6643
Joined: 30 Aug 2009
Total Posts: 791
15 Mar 2016 08:54 PM
You can use the Humanoid's .Died event.

Died Event: http://wiki.roblox.com/index.php?title=API:Class/Humanoid/Died
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
15 Mar 2016 09:02 PM
My method would require minimal scripting know-how...
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
15 Mar 2016 09:03 PM
Died event?
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
15 Mar 2016 09:07 PM
well you can use the died event, but isn't it much more simpler just to create a new value of some sort, put it in the humanoid, and then when the player respawns the value disappears. It's that simple.
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
15 Mar 2016 09:09 PM
Feel around their wrist for a pulse.
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
15 Mar 2016 09:10 PM
^

lolol
Report Abuse
Zeyadism is not online. Zeyadism
Joined: 07 Sep 2015
Total Posts: 11
15 Mar 2016 09:15 PM
@Morash I tried stabbing them in the throatuntil I was sure they couldn't still be alive but I got into some complications with local police.


I ᴄᴀɴᴛ ᴅʀᴏᴡɴ ᴍʏ ᴅᴇᴍᴏɴs ᴛʜᴇʏ ᴋɴᴏᴡ ʜᴏᴡ ᴛᴏ sᴡɪᴍ
Report Abuse
Zeyadism is not online. Zeyadism
Joined: 07 Sep 2015
Total Posts: 11
15 Mar 2016 09:20 PM
wait how do I detect if something is removed..


If game.Workspace.Player.Humanoid.CloneThis:Remove() == true then
script.Parent.Value = true
end

???


I ᴄᴀɴᴛ ᴅʀᴏᴡɴ ᴍʏ ᴅᴇᴍᴏɴs ᴛʜᴇʏ ᴋɴᴏᴡ ʜᴏᴡ ᴛᴏ sᴡɪᴍ
Report Abuse
R4G3N4R0K is not online. R4G3N4R0K
Joined: 16 Feb 2016
Total Posts: 74
15 Mar 2016 10:52 PM
game.Workspace.Player.Humanoid.ChildRemoved:connect(function(Child)
if Child.Name == "CloneThis" then
script.Parent.Value = true
end
end)
Report Abuse
Internecivus is not online. Internecivus
Joined: 31 May 2011
Total Posts: 2784
16 Mar 2016 12:17 AM
if not game.Workspace.Player.Humanoid:FindFirstChild("CloneThis") then
-- CloneThis does not exist inside Player's humanoid
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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