How to insert modules into local Group for camera movement?

Hello

I’m a bit stuck with the situation that is small. What I’m struggling is inserting a module that displays an object into a local Group. The purpose of this is when the camera moves the object that displays does not stick on the screen but instead goes of the screen when camera moves away from the object. This is what I have

object.lua

local M = {} local testFunction1 = function( x, y ) --print( "Test 1" )     local obj = display.newRect( 0,0,30,30 ) obj.x = x or display.contentWidth \* 0.5 obj.y = y or display.contentHeight \* 0.5 obj:setFillColor(math.random(0,255),100,0)     return obj end M.testFunction1 = testFunction1  

game.lua

module(..., package.seeall) function new() local localGroup = display.newGroup() --local game is the group that needs to have objective inserted into local game = display.newGroup() local objec --Function Stored in a table local myTable = { function() if tablething[2].money == i then --Here is the line of the code in which I call my object. objec = tablething[1].testFunction1( blocks[i].x, blocks[i].y) blocks[i].x = -100 end end } return localGroup end  

I have my object inserted into a group but when I do that I get an error. What am I doing wrong?