I'm new to all this scripting stuff, and I dont know how to make a VIP door use gamepasses. I know all the stuff I need, but the code I just don't understand, if someone could link me, or paste a code, that would be awesome!
COMMUNITY QUESTION
How to make a VIP door with gamepasses?
1 answer
I would do something like this, insert the script inside the part.
local GAMEPASS_ID_HERE = 10101010
function MPservice(id,plr)
game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,id)
end
script.Parent.Touched:connect(function(plr)
if plr.Parent:findFirstChild("Humanoid") and game.Players:findFirstChild(plr.Parent.Name) and
MPservice(game.Players:findFirstChild(plr.Parent.Name), GAMEPASS_ID_HERE ) then
i = game.Players:findFirstChild(plr.Parent.Name)
script.Parent.CanCollide = false
wait(time)
script.Parent.CanCollide = true
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
