How to make keycard door when you click E then door open.
✓ ANSWER ACCEPTED
How to make keybind keycard door?
1 answer
✓ Accepted answer
Here is a keycard model you can use for free here: www.roblox.com/item.aspx?seoname=Key-Card-Door&id=495619656
The script for the door is here (and in the free model) :
--By mb10932 (2018)
02
03
04 Door = script.Parent --Where The Door Part Is
05 Opentime = 1 -- How Long The Door Is Open For
06 Debounce = false --Stops The Door Being Opened More Than Once AT One Time
07
08 script.Parent.Touched:connect(function(Part)
09 if Debounce ~= true then --Make Sure That The Door Is Not Already Open
10 Debounce = true --Sets The Variable Debounce To True So The Script Knows Not To Open It Again.
11 local keycard = Part:FindFirstChild("keycard")--Find The BoolValue keycard (in the tool handle)
12 if keycard ~= nil and keycard.Value == true then --Check That keyvale exists and its set to true
13 Door.Transparency = 1 --Set Door Transparency to 1
14 Door.CanCollide = false --Set CanCollide to false
15 wait(Opentime) --Wait For How Long The Variable Opentime Is Set For
16 Door.CanCollide = true --Set CanCollide to false
17 Door.Transparency = 0 --Set Door Transparency to 0
18 end --Ends The If Statement
19 Debounce = false --Set Debounce To False So The Door Can Be Opened Again.
20 end --Ends The If Statement
21 end) --Ends The Function
2 comments
0
Thanks
0
np
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
This isn't a request site and you can find Youtube tutorials for that and then modify the script for the open door function.