I cannot get my Developer Products working. I have a script, and they are all the same, except the Developer I.D. and value. The button does nothing.
local MarketplaceService = Game:GetService("MarketplaceService") local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") local productId = 19460824 MarketplaceService.ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == productId then player.Character.leaderstats.Stage.Value + 1 game.Workspace.DisplayScreen.SurfaceGui.TextBox.Text = player.Name .. " has skipped one level!" end end end local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.PurchaseId ds:IncrementAsync(playerProductKey, 1) return Enum.ProductPurchaseDecision.PurchaseGranted end
Something tells me it is something ridiculously easy, but I cannot seem to find the error. I find now errors about this script in particular.
You didn't add correctly.
local MarketplaceService = Game:GetService("MarketplaceService") local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") local productId = 19460824 MarketplaceService.ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == productId then player.leaderstats.Stage.Value = player.leaderstats.Stage.Value +1 game.Workspace.DisplayScreen.SurfaceGui.TextBox.Text = player.Name .. " has skipped one level!" end end end local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.PurchaseId ds:IncrementAsync(playerProductKey, 1) return Enum.ProductPurchaseDecision.PurchaseGranted end
The Link: http://wiki.roblox.com/index.php/Developer_Products Maybe This Link May Help you.
Copy The Link and Paste it on your Browser.
if its in a normal gui not surface gui then u must change the surfacegui into gui inside the script.