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

"This item is not avaliable" When making a gamepass room?

Asked by 4 years ago

As the title says, this keeps popping up for both myself and other people when they try to access the gamepass room in my game. Im unsure if people have issues buying it in the store, but it is in my inventory and won't let me get into the room on both Roblox and Studio. I'm new to scripting so it's possible I messed up somewhere, even though I used a premade script. I'm not sure what the problem could be, so any help could be appreciated :) I can also copy and paste the code if anyone needs to look at it Thanks in advance, even if you aren't sure either :)

2 answers

Log in to vote
0
Answered by 4 years ago
local id = 000000 --id here0
script.Parent.Touched:Connect(function(hit)
    if hit.Parent:WaitForChild("Humanoid") then
        local ms = game:GetService("Marketplace service")
        if ms:UserOwnsGamePassAsync(game.Players:FindFirstChild(hit.Parent.Name).UserId, id) then
            script.Parent.CanCollide = false
            wait(1.5)
            script.Parent.CanCollide = true
        else
            ms:PromptGamePassPurchase(game.Players:FindFirstChild(hit.Parent.Name),id)
        end
    end
end)
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

I think I know what you mean. Roblox changed

PromptPurchase

to

PromptGamePassPurchase

change it to the 2 nd script PS: Next time put your script in so we can see what is wrong with the script

Answer this question