PromptGamePassPurchase Issue

I’m not sure if I’m doing something wrong - but I have a billboardGUI in startergui and the adornee is a part in workspace. I made a button on the billboardgui and have a script inside it to prompt a gamepasspurchase. For some reason, it doesn’t prompt and It turns out I just get tons of ‘Rodux’ and ‘Roact’ errors in my output when trying to click the button to prompt.

Some of the output being:

'CorePackages.Packages._Index.roact.roact.Component', Line 161 - method setState
  18:26:00.032 - Script 'CorePackages.Packages._Index.RoactRodux.RoactRodux.connect2', Line 162 - field callback
  18:26:00.032 - Script 'CorePackages.Packages._Index.Rodux.Rodux.Signal', Line 70 - method fire
  18:26:00.033 - Script 'CorePackages.Packages._Index.Rodux.Rodux.Store', Line 125
  18:26:00.033 - Stack End

And my code inside the button looking like:

script.Parent.MouseButton1Click:Connect(function()
	local mps = game:GetService("MarketplaceService");
	local player = game.Players.LocalPlayer;
	local productID = script.Parent.productID.Value;
	
	mps:PromptGamePassPurchase(player, productID)
end)

I’m not sure if this is a Roblox bug or just my issue.
Any help appreciated, thanks!

1 Like

This seems to be fine, might be a Roblox issue.

Ensure that the script is a LocalScript and that your product ID is a working/valid Game pass and not a developer product or some other asset.

1 Like

like what @CodeJared said, this is a roblox issue, I remember having this problem too, I reccomend telling roblox and making a forum for it.

1 Like

Errors with CorePackages are internal. I remember that this was an issue once before. Checking your id and script usage wouldn’t matter in this case because either your script would error or the prompt would tell you something went wrong or prompt you with the wrong asset.

Consider making a bug report in #platform-feedback:engine-bugs or repping a recent thread about it if one exists. Make sure to include details as required.

3 Likes