First of all, you're not supposed to use table.foreach (it's deprecated, and is going to be removed from Lua).
You might want to have a look at: http://lua-users.org/wiki/ForTutorial
for key,bullet in pairs(selv.Bul) do
bullet.y = bullet.y + 2
end
I've never coded Lua, so I'm not 100% sure about the above code.
And I'm also guessing that Bul is short for bullet, but you can call the key value pairs whatever you want.
PS:
WTF? No += operator in Lua?
Take off every Zigg for great rapist.
Now, outgay that!
function Me:Add()
table.insert(self.Bul, {x=self.x,
y=self.y})
end
function Me:Update()
for key,bullet in pairs(self.Bul) do
bullet.y = bullet.y + 2
end
end