Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to Make a sliding Keycard door?

I've been trying to do this for a while. And I need it so I configure the script so I can switch through "High Level Key Card Access" and "Low Level Key Card Access". Any suggestions would be appreciated.

1 answer

✓ Accepted answer

Try to do this, put a script on the door

script.Parent.Touched:Connect(function(Hit)
local CheckIfCard = Hit.Parent:GetDescendants()

for i,v in pairs(CheckIfCard) do
      if v:IsA("Tool") and v.Name == "CardName" then
         script.Parent.CanCollide = false -- Or any open door script
    end
end
end

Hope it works, sorry if i didnt understand well.

2 comments

0

if it doesnt work, try changing line 5 to "if v.Parent:IsA("Tool") and v.Parent.Name = "CardName" then"

0

It Works!!! Thanks.

This discussion is preserved as it was. New answers, comments, and votes are closed.