Hello, I want to use a tool to open a door, I have different doors and different cards for different players, I wanted to include an ID in the keycard to make a door open, but I don’t know how to make a door check the keycard ID (which is in a script inside the keycard)
This is the script:
This is the script:
local function OnCardTouch (Hit)
local Real = Hit:FindFirstChild("Keycard")
if Real then
script.Parent.Parent.Door.Transparency = 1
script.Parent.Parent.Door.CanCollide = false
wait(5)
script.Parent.Parent.Door.Transparency = 0
script.Parent.Parent.Door.CanCollide = true
end
end
script.Parent.Touched:connect(OnCardTouch)
I already checked the forum and youtube and I can’t find anything, so I’m creating a new Topic, please help me