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

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

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

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)

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

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