Hello. I recently have had a problem with gamepasses. I made this script, however when I step on the brick the pop-up says something along the lines of "This item is not for sale. Your account has not been charged", Even though it is for sale when I checked it. I'm honestly clueless.
local id = 5962307 --replace nil with your id
script.Parent.Touched:Connect(function(hit) local h = hit.Parent:WaitForChild("Humanoid") local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) if h ~= nil then game:GetService("MarketplaceService"):PromptPurchase(player,id) end end)
That's my script. Any help is appreciated!

1 comment
That worked, can't believe I missed that considering it was on the wiki. Thanks!