Help making a player killfeed

So, recently i had the idea of adding death effects to my game and was wondering how i could do that? How do i put a system so that when you kill someone lets say with just the “Classic Sword” itll register that “Player A” killed “Player B”… also when “Player A” kill the other player i wanna know how i can alter “Player B’s” body model… any suggestions?

also feel free to ask any question’s…

1 Like

I think the classic sword uses the Humanoid Tag method

when a humanoid dies check inside of it for an ObjectValue named ‘creator’ its value will be the killer’s player instance.

Humanoid.Died:Connect(function()
  local creator = Humanoid:FindFirstChild('creator')
  if creator and creator.Value then
    local killer = creator.Value
    -- do something with the killer
  end
end)
1 Like
local sword = sword -----handle of tool
sword.Touched:Connect(function(hit)
	if game.Players:FindFirstChild(hit.Parent.Name) then
		if hit.Parent.Humanoid.Health <= sworddamage then
			start effect----
		end
	end
end)
1 Like

I’ve been trying at this for a bit, and I cant seem to get it working… I’ve also tried to modify it to see if i could get it working but I cant…

can isee your code idont get it

local sword = script.Parent.Handle
sworddamage = 50
sword.Touched:Connect(function(hit)
	if game.Players:FindFirstChild(hit.Parent.Name) then
		if hit.Parent.Humanoid.Health <= sworddamage then
hit.Parent.Head:Destoy()
--test effect
		end
	end
end)

im using the same script as you, but obviously i modified it to adapt to my case.

did you test it on dummy or on player this work only for players

I tried it on both, it didnt seem to work…

well looks like you dont know how to type destroy()

local sword = script.Parent.Handle
sworddamage = 50
script.Parent.Equipped:Connect(function()
	local eq = true

	sword.Touched:Connect(function(hit)
		if eq == true then
			if game.Players:FindFirstChild(hit.Parent.Name) or hit.Parent:FindFirstChild("Humanoid") then
				if hit.Parent.Humanoid.Health <= sworddamage or hit.Parent.Humanoid.Health >= 0 then
			hit.Parent.Head:Destroy()
					print("rip")		
				end
			end
			end
end)
end)

and both scripts work 100%

1 Like

Yeah that was my bad for not spelling Destroy() right lol, also thanks for the help.

1 Like