I have a leaderstat named EXP and this script is meant to give EXP to you on a KO of another player, but I'm not sure why it won't work.
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local humanoid = character:WaitForChild("Humanoid") humanoid.Died:connect(function() for key, value in pairs(humanoid:GetChildren()) do local killer = value.Value if killer ~= nil then player.leaderstats.EXP.Value = (player.leaderstats.EXP.Value + 250) end end end) end) end)
What is this:
local killer = value.Value
Do you have another script which creates a value in the players humanoid when they get hit?