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

Gamepass doors will not work no matter what?

Asked by 6 years ago

Yes I am aware of the new ROBLOX Gamepass update. I've looked on that forum multiple times. I've tried making a simple gamepass door over and over again, but it seems as though it just won't work. I've even tried the ROBLOX Gamepass door, and it still won't work. I don't understand what else there could be, there isn't even an error message. Any advice?

1 answer

Log in to vote
0
Answered by
Amiaa16 3227 Moderation Voter Community Moderator
6 years ago

Tried using MarketplaceService:PlayerOwnsAsset() instead? You just gotta convert your gamepass id to its asset id. You can do so with this api.

local gamepassAssetId = 0 -- replace

script.Parent.Touched:Connect(function(c)
    local plr = c.Parent.ClassName == "Model" and game:GetService"Players":GetPlayerFromCharacter(c.Parent)
    if not plr then return end

    if not game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, gamepassAssetId) then
        c.Parent:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(0,0,0)
    end
end)
Ad

Answer this question