Have to shoot humanoid twice to confirm kill

  1. What do you want to achieve?
    So the player does not need to shoot the humanoid again after the humanoid died

  2. What is the issue?
    Once the player kills the other player, it won’t add 1 to the killers “Kills” leaderstat. To add 1 to the Killers “Kill” leaderstat the player needs to shoot the humanoid while its at 0 health again and then it will add it.

  3. What solutions have you tried so far?
    I tried making a seperate section for when the bullet reaches the humanoid, Youtube and some people I know, but no luck.

This section checks if the dummy that was hit is at 0 health, if so it will add 1 to the leaderstat
fh = dummy that was hit by the bullet

 	if fh.Health <= 0 then
		local player = players:GetPlayerFromCharacter(tool.Parent)
		player.leaderstats.Kills.Value += 1
	end

It kind of sounds like you might be checking if the humanoid health is <= 0 BEFORE the dummy’s health is decreased. Is that the case here?

It might be due to that, ill move this section after the humanoid was damaged.

Before this section you should put a a print statement like print(fh.Health) immediately after fh is supposed to be hit by the bullet. This would tell if fh is getting hit or not.

Are you using Raycasting, or Touched events to register the hit? Touched events for high speed items like bullets sometimes fail due to lag & the physics involved.

You were correct, it was a extremely simple fix which I simply didn’t realise, thank you.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.