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
http://wiki.roblox.com/index.php?title=User:Kingkiller1000/Bitwise_Operators this might have some of what you need (from comment by User#22604)