I would like to know what’s wrong with this if you would like here is the folder with this information.
Here is the id 8183052087
It works, thank you quin2007. So is this the best script possible for this type of a thing?
local GamepassID = 8183052087
local Buttons = script.Parent.Buttons:GetChildren()
for i = 1, #Buttons do
local CurrentChild = Buttions[i]
if CurrentChild:FindFirstChild("Gamepass") ~= nil then
game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer.UserId, GamepassID)
end
end
That’s a more “mindful” loop in a way.
local Id = 25748434
script.Parent.ClickDetector.MouseClick:Connect(function(playerWhoClicked)
game:GetService("MarketplaceService"):PromptPurchase(playerWhoClicked.UserId, Id)
end
Those all should work. :’)