So I was trying to see if I could script one, but when I test it with someone else it seems not to award the person who killed me. Any thoughts on the code below? I never really tried to see who killed who. IF someone could help I would appreciate it.
Error: None
Code:
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
char:WaitForChild("Humanoid").Died:connect(function()
if char:FindFirstChild("creator") and char.creator:IsA("ObjectValue") then
if plr.Name == "DevFrank" then
local killer = char.creator.Value
game:GetService("BadgeService"):AwardBadge(killer.userId, 0) --0 is an example
end
end
end)
end)
end)
