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: Get killer

Previous Thread :: Next Thread 
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
04 Jan 2013 09:03 PM
How do you check who the killer of a humanoid was?
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
04 Jan 2013 09:11 PM
Game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
Character.Humanoid.Died:connect(function()
if Character.Humanoid:findFirstChild('creator') and Character.Humanoid:findFirstChild('creator').Value then
local killer = Character.Humanoid.creator.Value;
print(killer.Name..' has killed '..Player.Name);
end
end)
end)
end)
Report Abuse
noah is online. noah
Joined: 11 Sep 2006
Total Posts: 18977
04 Jan 2013 09:13 PM
@epic
does a player's humanoid already have that value? or is it from a leaderboard?
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
04 Jan 2013 09:15 PM
Most weapons insert that ObjectValue into the Humanoid.


print("NOU.floodCheck")
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
04 Jan 2013 09:15 PM
It's from linked weapons.
Report Abuse
noah is online. noah
Joined: 11 Sep 2006
Total Posts: 18977
04 Jan 2013 09:15 PM
oh..
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
04 Jan 2013 09:17 PM
About 99% of weapons/tools have code in them that transfers an object value holding the player object of the shooter of the tool that transfers the object value to the humanoid of the player it hit, giving that specific player a 'tag' of the person that is shooting at them. Hope that made sense.
Report Abuse
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
04 Jan 2013 10:17 PM
Thanks!
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