Hey everyone!
Looks like I can’t figure out what’s wrong with that table. I’ve checked the forum, and found nothing helpful… seems like what I’m stumbled on is obvious to others.
I am generating a new table item on top of the table, and then I try to add something to that new item. But it seems like changes are being made to it’s first position.
local atable =
{
{ x = 0, y = 0}
}
table.insert(atable, atable[1])
atable[table.maxn(atable)].x = 1
atable[table.maxn(atable)].y = 1
But in that case atable[1].x = 1 while it should be 0