Hi guys. I really hope you can help. Basically I want my rectangle “j_1” to remove it self from the screen when it collides with “side”. I keep getting a error. Can anyone please help me 
Thanks I am greatly thankful.
Regards,
Jordan Schuetz
Ninja Pig Studios
[lua]module(…, package.seeall)
_W = display.contentWidth;
_H = display.contentHeight;
require “sprite”
require “ui”
local physics = require(“physics”)
physics.start()
physics.setScale(5 )
physics.setGravity( -9.8, 0 )
function new()
local localGroup = display.newGroup();
side = display.newRect(0,0,20,500)
side:setFillColor(140, 140, 140)
side.x = 1
physics.addBody(side, “static”)
function newRect()
j_1 = display.newRect(0, 0, 25, 25)
j_1:setFillColor(140, 140, 140)
j_1.x = _W/1 + 50
j_1.y = _H/math.random(1.2, 8)
physics.addBody(j_1)
j_1.collision = onLocalCollision
j_1:addEventListener( “collision”, j_1 )
end
local function onLocalCollision( self, event )
if ( event.phase == “began” ) then
newRect:removeSelf()
end
end
local spawn_tmr = timer.performWithDelay( 500, newRect, 10 )
–localGroup:insert(j_1)
localGroup:insert(side)
function changeScene(e)
if(e.phase == “ended”) then
director:changeScene(e.target.scene, “fade”);
end
end
side:addEventListener( “collision”, side )
side.collision = onLocalCollision
return localGroup
end[/lua] [import]uid: 29181 topic_id: 12554 reply_id: 312554[/import]