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

How to make an E to open door that only opens for specific tools?

Asked by 4 years ago

I am trying to make a keybind door that opens when [E] is pressed. It would check if you have a specific keycard for example. So lets say I have keycard A it would open the door and say "Successfully opened door" and my friend has keycard B and it would not be the correct clearance and it would say "Too low of a clearance". How could I create something like this?

0
just in door script add a function to check the keycard is it allowed like if keycard == A then --[[script that open door]] end ErtyPL 129 — 4y
0
or simply check if the player has a tool in his backpack or character called "keycard" , then ---- Paintertable 171 — 4y

1 answer

Log in to vote
0
Answered by
IDKBlox 349 Moderation Voter
4 years ago

Let me explain how things need to be set up...

First what you'll need to do is get a LocalScript and have it determine 1. Which door should be 'unlocked'. 2. A gui show up on the 'Selected Door' 3. Fire and event to the server which door needs to be unlocked

Server Script to handle server sided things 1.You need to get that Event when it's fired and unlock the door 2. Before you can unlock the door, you need to see if they have a keycard that will work.

I actually made a model for you. It involves command 'givekey' & 'takekey'

Keycard Model

Give it a shot, I have instructions for you aswell!

Have any questions let me know

0
What if I would want multiple keycards to open one door? For example the door I have is named "KeycardDoor" and I want it to open for multiple keycards. DrREDACTEDSCP 8 — 4y
0
In the Keycard Model above, Keycard 'A' Can open everydoor. while keycard 'D' can NOT open doors 'A' 'B' or 'C' IDKBlox 349 — 4y
Ad

Answer this question