Hi, I'm having problems with the Game Pass purchase system. Namely, the code seems to work correctly in Roblox Studio and on iOS, but not on PC.
I have arranged the GUI as seen:
Explorer Layout (tbs 1-4 are textbuttons)
On-Screen Layout (two more items down the list)
Now, when I click on the Gravity Coil buy, I get the usual prompt and it works every time I click. As soon as I click another buy button it doesn't work anymore. If I click one of the other buttons instead of the Gravity Coil one it doesn't work at all. I have tried rearranging but the behavior is always the same.
Each local script looks like this:
local item_id = 12345678
script.Parent.MouseButton1Down:Connect(function()
game:GetService('MarketplaceService'):PromptGamePassPurchase(game.Players.LocalPlayer, item_id)
print("prompt thingy")
end)
game.GetService.PromptGamePassPurchaseFinished()
I added the last line for good measure but it doesn't seem to resolve anything. I think the problem is the code as I am new and don't understand the specifics well enough. Always open to new ways to reiterate the scripts as long as they work correctly. Help please and thanks in advance!

3 comments
on line 6 , I dont see a reason why that line is there. You didnt create an event with it and you also not waiting until the event is fire , so I think you should take that out.
Overall , your code looks great ! Are there any errors? is line 4 printing?
Yeah, it prints and everything. As I said, I put line 6 for good measure even though I knew it would probably not do anything.