I made a developer product that adds 5 more points to the players leaderboard and I want to test it but I don't have any robux. So I tried using the studio's server test mode and everything goes fine except it doesn't change the points. Is this because I can't test it in studio's server test mode?
Script in the ServerScriptService:
ms = game:GetService'MarketplaceService'
PurchaseHistory = game:GetService'DataStoreService':GetDataStore'PurchaseHistory'
productID = 84579169
pointsToAdd = 5
ms.ProcessReceipt = function(receiptInfo)
for i, player in ipairs(game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
local p = player
local points = p:FindFirstChild("leaderstats"):FindFirstChild("Roll")
if receiptInfo.ProductId == productID then
points.Value = points.Value + pointsToAdd
local playerProductKey = 'p_' .. receiptInfo.PlayerId .. '_p_' ..
receiptInfo.PurchaseId
PurchaseHistory:IncrementAsync(playerProductKey, 1)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
end
Script in the gui button:
local button = script.Parent
local DevId = 84579169
button.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, DevId)
end)
note: I checked the product Id and there's nothing wrong with it.

1 comment
http://wiki.roblox.com/index.php?title=Lua_debugger