PointsService = game:GetService("PointsService")
Stat = "KOs"
game.Players.PlayerAdded:connect(function(p)
repeat wait() until p:FindFirstChild("leaderstats") ~= nil
repeat wait() until p.leaderstats:FindFirstChild(Stat) ~= nil
repeat wait() until p.leaderstats:FindFirstChild("NextPP") ~= nil
p.leaderstats[Stat].Changed:connect(function(prop)
print("Value changed!")
need = p.leaderstats:FindFirstChild("NextPP").Value
print("Found Need")
if prop >= need then
game:GetService("PointsService"):AwardPoints(p.userId,1)
need = need + 5 -- this is where it's messing up.
print("Awarded points and need has went up")
end
end)
end)
For some reason at line 13, need doesn't go up by 5. Everything works but that. (All of the prints and awarding player points)
Did I set it up wrong?

8 comments
Tried that, didn't do anything.
Try again updated
Hmm, so I can't have the Value when defining need?
I don't think you can a variable equal to some objects property, i'm not really sure myself.
Typo much ^
Lol, btw you forgot on line 11, it needs to be 'need.Value' Considering you took it off when it was trying to define 'need'. But with that said and it was working with that.. It's just ehh...
Well you can just use Data Persistence instead of using so much loops, just use p:WaitForDataReady().
and yeah, it's fixed now because of the ".Value". I don't really understand why it can't have it be attached to a value :/