Okay, so this is my problem, I am making a button where when you press, it's prompts the purchase of the product then afterwards awards players a certain amount of points based on the item bough. For example, 1,2,3,4, or 5 points. Here's my script. Any suggestions?
local MarketplaceService = Game:GetService("MarketplaceService")
local buyButton = script.Parent
local productId = 19714110
local PointsService = Game:GetService("PointsService")
function buy()
MarketplaceService:PromptProductPurchase(player, productId)
if ( pointsToAward > 0 and universeBalance == 0) then
PointsService:AwardPoints(player.userId, 1)
end
end
buyButton.MouseButton1Down:connect(buy)

1 comment
http://www.roblox.com/Forum/ShowPost.aspx?PostID=131619603 There, SML said "That is why we have points. Yes, you can buy points, but I am not sure why anyone would waste the money on something that you can get for free playing games. " on page 21