PromptGamePassPurchaseFinished not working!

Whenever I try calling PromptGamePassPurchaseFinished on MarketplaceService, the game pass Id variable returns as nil.
Whenever the game pass purchase is prompted, it calls the game pass a product, and the icon will not load!

Code I have used:

MarketplaceService.PromptGamePassPurchaseFinished:connect(function(client,id,purchased)
	print(id)
	if purchased then
		for i,v in pairs(_G.gamePasses) do
			if v["ID"] == id then
				local val = Instance.new("BoolValue")
				val.Name = v["ValName"]
				val.Parent = client
			end
		end
	end
end)
1 Like

A post was merged into an existing topic: PromptGamepassPurchase does not work