of     1   

MHebes
#115337120Sunday, October 13, 2013 2:15 AM GMT

I'm just wondering what the reason is for making a variable set to a pre-existing table actually be a reference to the same table, rather than a copy. For instance: a = 1 b = a b = 2 print(a) > 1 Makes sense, because b was just set to have the same value as 'a' a = {1} b = a b[1] = 2 print(a[1]) > 2 Does this happen just because tables are assigned a specific slot in the memory, whereas numbers are just... intuitive, or something? I'm just curious why there's the discrepancy.
ember1465
#115345060Sunday, October 13, 2013 3:33 AM GMT

Think of a table like ROBLOX part, assigning it to multiple variables wouldn't clone the part. The variables are pointers to the same table rather than each having a separate clone of one. ~ Rainbow Dash is best pony ~
Oysi
#115345698Sunday, October 13, 2013 3:38 AM GMT

[ Content Deleted ]

    of     1