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

Why won't this Point Giver script for leaderboard not working?

Asked by 6 years ago
Edited 6 years ago

I made a leaderboard with Points, and made a point giver, and added a script, but it is saying at line 8 there is an error.

debounce = true

script.Parent.Touched:connect(function(hit)
    humanoid = hit.Parent:FindFirstChild("Humanoid")
    if humanoid ~= nil and debounce == true then
        debounce = false
        player = game.Players:GetPlayerFromCharacter(hit.Parent)
        points = players.leaderstats.Points
        points.Value = points.Value + 5
        script.Parent.BrickColor = BrickColor.new("Really red")
        wait(5)
        debounce = true
    end
end)

1 answer

Log in to vote
0
Answered by 6 years ago

in line 8 it should be "player" not "players"

Ad

Answer this question