What I am trying to do here is make a shopping cart, where multiple items can be purchased on selection. The problem is, it only prompts the purchase for the first item in the cart. I had tried a repeat wait() until but I got the same problem. Here is the script I used (local script):
local market = game:GetService("MarketplaceService")
script.Parent.MouseButton1Click:Connect(function()
for a, b in pairs(script.Parent.Parent.Items:GetDescendants()) do
if b:IsA("NumberValue") and b.Name == "AssetId" then
market:PromptPurchase(game.Players.LocalPlayer, b.Value)
repeat wait() until market.PromptPurchaseFinished
end
end
end)
Side-note: I am trying to avoid ProcessReceipt because this is supposed to be client-sided. If I have no other choice, please let me know.
Thank you in advance!
