local Debounce = true
script.Parent.Touched:connect(function(Handle)
local Number = Handle:FindFirstChild("CardNumber")
local Staff = Handle:FindFirstChild("BoolValue")
if Staff.Value then
if Debounce == true then
Debounce = false
if Staff.Value == true
then
script.Parent.Parent.Door.Transparency = 0.4
script.Parent.Parent.Door.CanCollide = false
wait(2)
script.Parent.Parent.Door.Transparency = 0
script.Parent.Parent.Door.CanCollide = true
else
if Number then
script.Parent.RoomNumber.Value == Number.Value and Staff.Value == false
then
script.Parent.Parent.Door.Transparency = 0.4
script.Parent.Parent.Door.CanCollide = false
wait(2)
script.Parent.Parent.Door.Transparency = 0
script.Parent.Parent.Door.CanCollide = true
else
print("Incorrect card")
end
end
wait(0.3)
elseif Debounce == false then
Debounce = true
end
end)
19:18:43.033 - Workspace.Functional Door Kitorari.Scanner.Script:9: attempt to index local 'Staff' (a nil value)
^I'm not sure whats going on. The Boolvalue is there. And CardNumber isn't having problems...
How do I fix this?
Help would be great..

1 comment
Actually, I meant BoolValue. Sorry. XD