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

How to make a VIP door with gamepasses?

Asked by 9 years ago

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!

1 answer

Log in to vote
0
Answered by
Adryin 120
9 years ago

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)
Ad

Answer this question