Exp script wont work?
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.
01 | game.Players.PlayerAdded:connect( function (player) |
02 | player.CharacterAdded:connect( function (character) |
03 | local humanoid = character:WaitForChild( "Humanoid" ) |
04 | humanoid.Died:connect( function () |
05 | for key, value in pairs (humanoid:GetChildren()) do |
06 | local killer = value.Value |
08 | player.leaderstats.EXP.Value = (player.leaderstats.EXP.Value + 250 ) |