local tbl = {}
local varTbl = tbl-- This does not create a copy of 'tbl' but rather a reference
-- This does not happen with other data types Example:
local str = "Hello"
local varStr = str -- This does not reference but rather make varStr equal to "Hello"
The variable ‘varTbl’ acts as a reference to ‘tbl’ and any changes done to it will replicate to the original table.
How do I get a table and store it in a variable without referencing it?