I'm trying to make this so EVERY 4 KOs, you get 1 Player Point, but instead, it gives 1 Player Point after the 4 KOs. Help me please?
PointsService = game:GetService("PointsService")
Stat = "KOs"
Needed = 4
game.Players.PlayerAdded:connect(function(p)
repeat wait() until p:FindFirstChild("leaderstats") ~= nil
print("Found \"leaderstats\" object!")
repeat wait() until p.leaderstats:findFirstChild(Stat) ~= nil
print("Found "..Stat.." object!")
p.leaderstats[Stat].Changed:connect(function(prop)
print("Value changed!")
if prop >= Needed then
wait()
game:GetService("PointsService"):AwardPoints(p.userId,1)
end
end)
end)

1 comment
So the KOs would be 4, 8, 12.. so on and so forth.