I am trying to set the y value to an image so I can position it but I keep getting an error message.
What am I doing wrong?
Error Message: Attempt to index local sawone (a nil value)
Here is my code
-- Creates Saw local function spawnSaw() local singleSaw = display.newImageRect( "images/saw.png", 120, 120 ) singleSaw.x = 70 physics.addBody( singleSaw, "static", {bounce=0, density=2, friction=2} ) end local sawone = spawnSaw() sawone.y=30