Hello, I have a system where when you get shot by guns at health like 20 or 25 you become wounded you either have to click give up or wait for medic but the problem is when you click give up the killer doesn’t get any kill and I have no absolute idea how I can find the killer so I can send it to remote event… to give kill to the killer so anyone have any idea?
game.ReplicatedStorage.Events.GiveUP.OnServerEvent:Connect(function(player)
--local Object = Instance.new("ObjectValue", player.Character.Humanoid)
--Object.Value = Killer is unknown and I need a way to find him..
player.Character.Humanoid.Health = 0
end)
I assume that finding the killer in the first place is the main issue here if I am correct. Perhaps you can store the last enemy player to have damaged the player who gives up.
You can find out which player hit the other player before the Wounded player dies
An example of this in the video is that points are awarded to a player when the other player is injured, immediately before the death of the injured player, and other points are calculated upon the death of the injured player.
A distinction can be made between someone who hit the other player and someone who killed the other player
Thanks bro, I appreciate your help but um I fixed it by making object values into humanoid when player is wounded and it give kills when player click give up button instead of waiting for medic.