Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you fix "your purchase failed because something went wrong your account has not be charged"?

Asked by 2 years ago

Each time I click the buy button to get the jump coil it just says "your purchase failed because something went wrong your account has not be charged".

local MarketplaceService = game:GetService("MarketplaceService") 

Shop = script.Parent.Shop
local Textbutton2 = Shop.Detailsjumpcoil.TextButton2
local Open = Shop.Parent.Open

local player = game.Players.LocalPlayer

local jumpcoilgamepassID = 191028585

Textbutton2.MouseButton1Click:Connect(function(haspass)
    local success, message = pcall(function()
        haspass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, jumpcoilgamepassID)
    end)

    if haspass then
        print("player already has the gamepass")
    else
        MarketplaceService:PromptGamePassPurchase(player, jumpcoilgamepassID)
    end
end)

Open.MouseButton1Down:Connect(function()
    Shop.Visible=not Shop.Visible
end)

1 answer

Log in to vote
0
Answered by 2 years ago

It might be because you can't purchase a gamepass in Roblox Studio so it would show up as an error. Try testing the actual game.

0
but the other script that i have for the other coil works just fine clayman4589 0 — 2y
0
it may be a roblox glitch? Yesterday Roblox purchases didn't work for anyone and I'm not sure if it's fixed yet but I don't think it has anything to do with the script. MarcTheRubixQb 153 — 1y
Ad

Answer this question