In my callGameOver = function, when I click on the menu, restart or next button I get anattempt to compare nil to number in the createLevel = function
at
1 2 3 | if claw.x < 116 then claw.x = 116 end |
Try adding a nil check to your logic statement:
if claw.x ~= nil and claw.x < 116 then
claw.x = 116
end