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

Gamepass doors will not work no matter what?

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

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)

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