I have a shop with 3 options for gamepasses, they have IntValues inside with the gamepass value. Why does this not prompt the gamepass? No errors in console.
for i,Pass in pairs(script.Parent.Contents.Top.Gamepasses:GetChildren()) do
if Pass:IsA("TextButton") then
Pass.MouseButton1Click:Connect(function()
game.MarketplaceService:PromptGamePassPurchase(game.Players.LocalPlayer, Pass.PassId.Value)
end)
end
end

3 comments
Yes the gamepasses are textbuttons the only thing I could think of would be I have text labels and a frame in the same frame the gamepass options are in
I think that could be a possibility, seperate the textbutton from everything else, and see what happens..
Yes so usually just remember, most of the time if there are no errors and there are if statements within your code, the if statements might be doing their job.