Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Exp script wont work?

Asked by 9 years ago

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.

01game.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
07                if killer ~= nil then
08                    player.leaderstats.EXP.Value = (player.leaderstats.EXP.Value + 250)
09                end
10            end
11        end)
12    end)
13end)

1 answer

Log in to vote
0
Answered by 9 years ago

What is this:

1local killer = value.Value

Do you have another script which creates a value in the players humanoid when they get hit?

0
I'm going to work on the script a bit, so im just gonna mark the answer right. kelimeguy 60 — 9y
0
Hahah ok. MaskedVoid 15 — 9y
Ad

Answer this question