I tried adding 100 to the value of a player's healthValue (an IntValue) when they purchased a developer product. Here's the script:
local market = game:GetService("MarketplaceService") market.ProcessReceipt = function(receiptInfo) if receiptInfo.ProductId == 566972951 then local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId) plr.healthValue.Value = plr.healthValue.Value + 100 end end
Whenever a player buys the product, they gain 100. However, buying the product again results in adding 200 more to the value instead of 100. How does this work and how can I fix this?