Detecting tool via creator tag - attempt to concatenate string with nil

Hello

  1. What do you want to achieve? I want to get the tool used in the kill for a killfeed system im using (creator tag)

  2. What is the issue? fails to get tool always ends up with attempt to concatenate stirng with nil

  3. What solutions have you tried so far? I looked up and tryed adding .Name at the end but it didnt work

ServerScriptService Script

local killedEvent = game.ReplicatedStorage.KilledEvent

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		char:WaitForChild("Humanoid").Died:Connect(function(killed)
			local killer = char.Humanoid:FindFirstChild("creator")
			local KillerTool = nil
			if killer and killer.Value then
				local KillerName = killer.Value
				
				for _, Tool in pairs(killer:GetChildren()) do
					if Tool:IsA("Tool") then
						KillerTool = Tool
					end
				end
				

				killedEvent:FireAllClients(plr, KillerName, KillerTool)
			end
		end)
	end)
end)

LocalScript within a GUI

local KilledEvent = game.ReplicatedStorage.KilledEvent
local TextLabel = script.TextLabel

local words = {"💥","🎯","💀","⚔️"}

KilledEvent.OnClientEvent:Connect(function(plr, KillerName, KillerTool)
	if plr and KillerName then
		local newLabel = TextLabel:Clone()
		newLabel.Text = words[math.random(1,#words)].." "..KillerName.Name.." killed "..plr.Name.." with "..KillerTool
		newLabel.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui").KillFeed.Frame
		wait(5)
		newLabel.Transparency = 0.1
		wait(0.1)
		newLabel.Transparency = 0.2
		wait(0.1)
		newLabel.Transparency = 0.3
		wait(0.1)
		newLabel.Transparency = 0.4
		wait(0.1)
		newLabel.Transparency = 0.5
		wait(0.1)
		newLabel.Transparency = 0.6
		wait(0.1)
		newLabel.Transparency = 0.7
		wait(0.1)
		newLabel.Transparency = 0.8
		wait(0.1)
		newLabel.Transparency = 0.9
		wait(0.1)
		newLabel.Transparency = 1
		wait(0.1)
		newLabel:Destroy()
	end
end)

The line local KillerName = killer.Value assigns the value of killer to KillerName, but killer is not a StringValue, it is likely a ObjectValue. Try changing this line to local KillerName = killer.Value.Name.

You could also add a check to see if there are any tools in killer:GetChildren(), since it is possible for KillerTool to remain nil if there are no tools.

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        char:WaitForChild("Humanoid").Died:Connect(function(killed)
            local killer = char.Humanoid:FindFirstChild("creator")
            local KillerTool = nil
            if killer and killer.Value then

Try using StringValue.Value with FindFirstChild. Also I recommend using TweenService for changing the transparency of stuff. If your doing it smoothly.

TweenService | Roblox Creator Documentation