I've been stumped by player points ever since they came out. Now I have attempted to use free models and figure it out so this is what I have...
local service = game:GetService("PointsService")
game.Players.PlayerAdded:connect(
function(Player)
Player:waitForDataReady()
service:AwardPoints(161887225, service:GetAwardablePoints())--My game id...
end
)
The script above is for giving the server the points I have... I think Also, this is the point awarding script...
PointsService = game:GetService("PointsService")
Stat = "KOs"
Needed = 1
game.Players.PlayerAdded:connect(function(p)
repeat wait() until p:FindFirstChild("leaderstats") ~= nil --Wait until the script has found the leaderboard stats of the player
repeat wait() until p.leaderstats:findFirstChild(Stat) ~= nil --Wait until the script has found the KOs of the player
p.leaderstats[Stat].Changed:connect(function(prop) --Bind the KOs to the function "prop"
if prop >= Needed then --If the KOs has changed by 1, then award 1 point
game:GetService("PointsService"):AwardPoints(p.userId,1)
end
end)
end)
Can anyone help me with this?... I really don't get these player points and I want to implement them into my game as a test. P.S. I have player points in my game already.
