I have made a gamepass shop in which if a person clicks a button, they buy a gamepass. For some reason, it shows a T-Shirt instead of the gamepass when I click the buy button to test it. I am not sure why it does this.
CODE PUT INSIDE THE BUTTON:
local productId = 4897669 local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() Game:GetService("MarketplaceService"):PromptPurchase(player, productId) end)
Please help!
PromptPurchase
is for things like clothing. Use PromptGamePassPurchase
instead.local productId = 4897669 local player = game:GetService("Players").LocalPlayer script.Parent.MouseButton1Click:Connect(function() -- :connect is deprecated, use :Connect Game:GetService("MarketplaceService"):PromptGamePassPurchase(player, productId) end)