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

Why does this script not give Rep when a player kills someone?

Asked by 4 years ago
player.CharacterAdded:Connect(function(character)
    character:WaitForChild("Humanoid").Died:Connect(function()
        local tag = character.Humanoid:FindFirstChild("creator")
        if tag ~= nil then
            local player = tag.Value
            local bounty = 20

            local leaderstats = play:WaitForChild("leaderstats")
            leaderstats.Reputation.Value = leaderstats.Reputation.Value + bounty
        end
    end)
end)
0
On line 8, I think you meany "player" but you put "play" sheepposu 561 — 4y
0
I'm having the same problem with Int Variables. JaytheKing452 9 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
player.CharacterAdded:Connect(function(character)
    character:WaitForChild("Humanoid").Died:Connect(function()
        local tag = character.Humanoid:FindFirstChild("creator")
        if tag ~= nil then
            local player = tag.Value
            local bounty = 20

            local leaderstats = player:WaitForChild("leaderstats")
            leaderstats.Reputation.Value = leaderstats.Reputation.Value + bounty
        end
    end)
end)
0
I just made "play" on line eight to "player" CeramicTile 847 — 4y
Ad

Answer this question