i am trying to detect the killer when player kill an npc, my code is working when i kill the npc whith sword but if i kill the npc using a gun he does not find the killer why ?
this script in the npc:
humaniod.Died:Connect(function(health) local killer = humaniod.creator.Value print(killer.Value) end)
Maybe try:
humaniod.Died:Connect(function(health) local killer = humaniod.creator print(killer.Value) -- We need this ".Value" inside the print end)
Next time, please include all code.