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

My gamepass door wont work? "currently not for sale"?

Asked by 5 years ago

I made this touch-gamepass vip door and whenever I touch it it says "this item is currently not for sale. your account has not been charged" How is this possbile if my gamepass * is* actually for sale?

ItemID = (4765283)
OpenTime = 2 
OpenTrans = 0.5 
CloseTrans = 0 
BuyGUI = true 
KillOnTouch = false

-----------------------------------------------------------------------------------------------

Door = script.Parent
Serv = game:GetService("BadgeService")
MServ = game:GetService("MarketplaceService")
if not _G.Players then
 _G.Players = {[ItemID] = {}}
elseif not _G.Players[ItemID] then
 _G.Players[ItemID] = {}
end

Table = _G.Players[ItemID]

function CheckPlayer(player2)
 for i = 1,#Table do
  if Table[i] == player2 then
   return true
  end
 end
 return false
end

Door.Touched:connect(function(hit)
 if game.Players:GetPlayerFromCharacter(hit.Parent) then
  player = game.Players:GetPlayerFromCharacter(hit.Parent)
  if Serv:UserHasBadge(player.userId,ItemID) or CheckPlayer(player) then
   Door.CanCollide = false Door.Transparency = OpenTrans
   wait(OpenTime)
   Door.CanCollide = true Door.Transparency = CloseTrans
   else
   Door.CanCollide = true Door.Transparency = CloseTrans
   if BuyGUI == true then
    MServ:PromptPurchase(player,ItemID)
    h = player.Character:FindFirstChild("Humanoid")
    if h then
     h.WalkSpeed = 0 end
     local con
     con = MServ.PromptPurchaseFinished:connect(function(ply,asset,purch)
     if ply == player and asset == ItemID then
      con:disconnect()
      if purch then
       if h then
        h.WalkSpeed = 16 end
        table.insert(Table,player)
        elseif KillOnTouch == true then
        Door.CanCollide = true Door.Transparency = CloseTrans
        player.Character:BreakJoints()
       end
      end 
     end)
    elseif KillOnTouch == true then
    Door.CanCollide = true Door.Transparency = CloseTrans    
    player.Character:BreakJoints()
   end
  end
 end
end)
0
I think you need to use PromptGamePassPurchase and UserOwnsGamepassAsync Jabba171 16 — 5y
0
Same problem here... it probably has something to do with the new system roblox uses to store gamepasses Dylan011444 59 — 5y

2 answers

Log in to vote
0
Answered by
Delude_d 112
5 years ago
Edited 5 years ago

You already have the gamepass. Gimme more info if i'm not correct.

0
I tested it with an alt account and it still said the same thing :/ HypedNebula 28 — 5y
0
hmm... It's probably roblox again.. I have no experience in this problem so, i'm useless. My bad Delude_d 112 — 5y
Ad
Log in to vote
0
Answered by
Sir_Melio 221 Moderation Voter
5 years ago

I checked that game pass (https://www.roblox.com/game-pass/4765283/-). It's not for sale.

0
https://www.roblox.com/game-pass/4765283/Special-VIP (you didn't add the "special-vip") HypedNebula 28 — 5y
0
https://imgur.com/sqkk52J That's what the output says HypedNebula 28 — 5y
0
They lead to the same page, you just put it on sale this time. Also the id in that image is different. Sir_Melio 221 — 5y

Answer this question