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

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

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

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.

2 comments

0

but the other script that i have for the other coil works just fine

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.

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