I'm not talking about that. You have io.open with the second parameter not being in quotes, which breaks things as Lua thinks you're passing a variable.
local fill = io.open("doorSettings.txt", r)
The r needs quotes. Both door controller scripts have this issue.
Loading these files in VS Code shows a large number of syntax errors. I'm using the Lua Language server from sumneko. Some of these errors can be ignored (e.g. os.sleep isn't in base Lua), but a few break the code (e.g. line 129 of the multi door controller is missing quotes around the second io.open parameter).