Like in most games whena player kills a player he gets a "ko" but how can you tell if a player killed a player?
How can you tell if player1 killed player2?
1 answer
###A recent update has disabled this functionality from transferring to the ROBLOX website. Kills can still be recorded in-game, however will not be counted on player profiles.
There is like a tag that is inserted into the player's character leading back to the originator (if that makes sense).
Say I fired a bullet from a gun, and struck you. A ObjectValue named "creator" in your character's humanoid. The value of "creator" would be me, since I am the shooter.
Roblox would be able to trace that value back to my character, and give me the knockout on my profile. Creating the leaderboard script in game is the tricky part, and we don't give out leaderboard scripts.
If you do not get rid of the creator tag after some time, there is going to be something common called "Kill stealing", so you can avoid that by adding the creator tag to debris after some time.
I have whipped up a example below;
part.Touched:connect(function(part)
if part.Parent:FindFirstChild("Humanoid") then
local tag = Instance.new("ObjectValue", part.Parent.Humanoid)
tag.Value = game.Players.LocalPlayer --Assuming Local Script.
tag.Name = "creator"
game.Debris:AddItem(tag, 1) --Should delete after a second, enough for a leaderstat to read it if the person died.
end
end)
You can read about the creator value in this wiki page.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Note that this is only a CONVENTION and that not all tools will do this! (Though this is how the site tracks KOs so as far as that goes this works)