I'd like to do something similar to the following, but with fewer If statements, if you get where I am going with this; through research it appears Roblox Lua doesn't allow for Lua 5.3 bitwise operations?
local N = 1 -- Bitwise enumerators for wall placement
local S = 2
local E = 4
local W = 8
if bitValue == N or bitValue == N + S .......... then -- North Wall
InsertWallPart(parent, x, _posY or defaultFloorY, z, N)
end
if bitValue == W then -- West Wall
InsertWallPart(parent, x, _posY or defaultFloorY, z, W)
end
if bitValue == S then
InsertWallPart(parent, x, _posY or defaultFloorY, z, S)
end

4 comments
"Roblox Lua" isn't its own language.
^ he's right in saying roblox lua because it's the way roblox modded lua that doesn't allow him to use them
http://wiki.roblox.com/index.php?title=User:Kingkiller1000/Bitwise_Operators this might have some of what you need
Throw that into the answer and I'll credit you, because it definitely worked for my case