If anyone runs into the nil value error, update this function in the .lua file with this:
local function newLayer(name) local s = app.activeSprite local lyr = s:newLayer() lyr.name = name local img = Image(s.spec) local cel = s:newCel(lyr, app.activeFrame.frameNumber, img, Point(0, 0)) app.activeLayer = lyr app.activeCel = cel return lyr end