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

Why are my customers not getting their Player Points?

Asked by 10 years ago

I have this script, in a normal script, since PP work in normal scripts only. But I am not getting my points, what's wrong with my script?

local buyButton = game.Workspace.Buttons.BuyButton.SurfaceGui.TextButton
buyButton.MouseButton1Click:connect(function(LocalPlayer)
    local user = LocalPlayer.userId
    local productId = 19251902
    Game:GetService("MarketplaceService"):PromptProductPurchase(LocalPlayer, productId)
    local PointsService = Game:GetService("PointsService")
    local pointsToAward = PointsService:GetAwardablePoints()
    game.Players.LocalPlayer.leaderstats.Diamonds.Value = LocalPlayer.leaderstats.Diamonds.Value + 10
    if ( pointsToAward > 0) then
        PointsService:AwardPoints(player.userId, 1)
    end
end)
0
The MouseButton1Click button doesn't return anything. Thewsomeguy 448 — 10y
0
So what would the correct script be? fahmisack123 385 — 10y

Answer this question