I made a Script in ServerScriptStorage, it's deposed to detect if a player kills or gets killed and print when these events happen. The sword creates a creator tag in the humanoid but my script won't print the message. What's the problem?
Script:
local players = game.GetService("Players")
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
humanoid.Died:Connect(function()
print("You died!")
if humanoid:FindFirstChild("creator") ~= nil then
local Killer = humanoid.creator.Value
print("You're the killer!")
end
end)
end)
end)
