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

How do I make door that only players with a specific gamepass can open?

Asked by 5 years ago

I need to make a script so that when a door is touched and the player has the Game Pass, the door will open for a few seconds before closing! How can I do this?

1 answer

Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
5 years ago

Ok, here's how to make a specific game pass door.

Firstly, make a game, and secondly, do a gamepass.

Here's the tutorial that tells you how to do a gamepass.

How to do a gamepass:

You must publish your game to the ROBLOX first (Shortcut key: ALT + P), then go to the ROBLOX website, press 'Create', the 'Create' button is on the ROBLOX website top. Once you opened the 'Create', find the game you want, and then press the settings button. Now, press 'Create Game Pass'. Insert images, type the game pass title and the description inside.

When you're done, press upload, and go back to your ROBLOX studio, open 'View', and then click on 'Game Explorer'. And check out are the gamepass was inside there (You can check it in Developers Product)! If that doesn't appear anything there, reopen the ROBLOX studio.

Ok, when you inserted them inside, insert this script:

(It might be very long lol)

01--------------------
02--| WaitForChild |--
03--------------------
04 
05-- Waits for parent.child to exist, then returns it
06local function WaitForChild(parent, childName)
07    assert(parent, "ERROR: WaitForChild: parent is nil")
08    while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
09    return parent[childName]
10end
11 
12-----------------
13--| Variables |--
14-----------------
15 
View all 80 lines...

When you inserted the script inside, insert an IntValue into the game!

Make the IntValue was parented by the script, and then make the IntValue's value become yours gamepass ID!

You can copy the gamepass ID by going to the Game Explorer > Developers Products > YOUR GAMEPASS NAME > Right click on YOUR GAMEPASS NAME > Copy the ID!

Remember, I don't own this thing, but I also glad to help too!

Please mark this as an answer if that's work on you! Cyaaa~~

(I typed so long so nvm upvote please lol, and sorry for my grammar problem)

(bonus: I upvoted)

Ad

Answer this question