Problem with gamepasses

So all of us can agree on one thing, gamepasses give us robux. This is very crucial to any developer trying to get robux but recently doing stuff with gamepasses I noticed one thing:

When trying to purchase a gamepass it says its a product
Gamepass ID is seen as a product

If anyone knows whats happening please help

	local id = 8140158
	
	if game:GetService("GamePassService"):PlayerHasPass(plr, id) then 
        plr.VIP.Value = true
    else
        plr.VIP.Value = false
    end

image

1 Like

Gamepass service is deprecated and uses the old system of numbering gamepasses (they used to be numbered like assets). Use MarketplaceService for new work. MarketplaceService | Documentation - Roblox Creator Hub

5 Likes

I also get same with gamepass purchase when I try to buy it it labels it as a product rather than a gamepass

Are you using PromptGamePassPurchase or the Gamepass service’s function? You shouldn’t be using Gamepass service at all.

2 Likes
script.Parent.MouseButton1Click:Connect(function(mouse)
	local MarketplaceService = game:GetService("MarketplaceService")
	local gamePassID = 8140158 -- Change this to your game pass ID
 
	local player = game.Players.LocalPlayer
		
	game:GetService("MarketplaceService"):PromptGamePassPurchase(player, gamePassID)
end)

Local script

Copy pasting that exact code works fine for me. Are you sure the error is coming from that script?

2 Likes

Try This:

local id = 8140158 
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, id) then
       plr.VIP.Value = true 
else 
       plr.VIP.Value = false 
end