I have this gamepass script so that when you click the gui button it asks you if you want to buy it but when i try to it says 22:11:05.710 - PurchasePromptScript: getProductInfo failed because MarketplaceService:getProductInfo() failed because rawProductInfo was empty Make sure a valid ID was specified (x2)
This is my script
local productId = 1008824264 local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptPurchase(player, 1008824264) end)
I checked out the link of the asset that you're using and it looks like you're using a gamepass. Gamepasses can only have a purchase prompt when using PromptGamePassPurchase.
local productId = 1008824264 local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(player, 1008824264) end)
That's all you gotta do!