So, I have this loading screen. It will eventually wait 1 min and then move on, for now you must pay 1 tix while I am developing the game. When I click the button, nothing happens. It should be doing all the devproduct stuff, and then making the current frame invisible, and the new one visible. Could someone tell me why it doesn't work? Thanks!
local MarketplaceService = game:GetService("MarketplaceService")
local productId = 22106513
loading = game.Players.LocalPlayer.PlayerGui.ScreenGui.loading
results = game.Players.LocalPlayer.PlayerGui.ScreenGui.results
game.Players.PlayerAdded:connect(function()
print("start")
local DeveloperProducts = game:GetService("MarketplaceService"):GetDeveloperProductsAsync():GetCurrentPage()
for _, DevProductContainer in pairs(DeveloperProducts) do
for Field, Value in pairs(DevProductContainer) do
print(Field .. ": " .. Value)
end
print(" ")
end
print("end")
end)
MarketplaceService.ProcessReceipt = function(receiptInfo)
for i, player in ipairs(game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == productId then
loading.Visible = false
results.Visible = true
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
