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)