Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can somebody help me with my gamepass not working?

I made a donation game. for my group and sadly it does not work I have set it up correctly and everything but when I click something to buy it prompts a purchase but it is a totally different thing to what I set it too.

Here is the script.

-- Enomphia
local a = 4753874
local b = 4753876
local c = 4753878
local d = 4753880
local e = 4753882

local LocalPlayer = game.Players.LocalPlayer

script.Parent['1'].MouseButton1Click:Connect(function()
	game:GetService("MarketplaceService"):PromptPurchase(LocalPlayer, a)
end)

script.Parent['2'].MouseButton1Click:Connect(function()
	game:GetService("MarketplaceService"):PromptPurchase(LocalPlayer, b)
end)

script.Parent['3'].MouseButton1Click:Connect(function()
	game:GetService("MarketplaceService"):PromptPurchase(LocalPlayer, c)
end)

script.Parent['4'].MouseButton1Click:Connect(function()
	game:GetService("MarketplaceService"):PromptPurchase(LocalPlayer, d)
end)

script.Parent['5'].MouseButton1Click:Connect(function()
	game:GetService("MarketplaceService"):PromptPurchase(LocalPlayer, e)
end)

Check it out here: https://www.roblox.com/games/2037472475/DonationCenter

Thanks, Enomphia

3 answers

ROBLOX doesn't support/use the PromptPurchase, you should use instead PromptGamepassPurchase.

You can learn more by visiting the ROBLOX Wiki.

This discussion is preserved as it was. New answers, comments, and votes are closed.