In-game Gamepass error

Hello i have an issue with my gamepass, a few weeks ago i made a working gamepass but now when i playtest or even when i actually play on my account it suddenly says “Error the item is not currently for sale. Your account has not been charged” I literally have no idea what i should do and i would apprechiate some help

3 Likes

Are you sure the gamepass is on sale? Make sure to go to development items on the game and put it on sale, else can you provide the script please?

2 Likes

Can you provide the script please?

3 Likes

Here is the script that i’ve put in the buying button in my screen GUI:


script.Parent.MouseButton1Click:Connect(function()

game:GetService(“MarketplaceService”):PromptGamePassPurchase(game.Players.LocalPlayer,161390358)

end)

2 Likes

Here is the script that i’ve put in the buying button in my screen GUI:


script.Parent.MouseButton1Click:Connect(function()

game:GetService(“MarketplaceService”):PromptGamePassPurchase(game.Players.LocalPlayer,161390358)

end)

1 Like

Yup the gamepass is there when i go to my game and then store, I don’t see any issue. Here is the link to my game: Doraemon! [NEW MAY2023] ♥ - Roblox

1 Like
script.Parent.MouseButton1Click:Connect(function()
    game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer, 161390358)
end)

This won’t work if its in a server script, so make sure you are using a local script.