Advertisement
xXCrystalKittensXx

CloneTable

Apr 19th, 2021
613
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.21 KB | None | 0 0
  1. local function CloneTable(table)
  2.     local new = {}
  3.     for i, v in next, table do
  4.         if (typeof(v) == "table") then
  5.             new[i] = CloneTable(v)
  6.         else
  7.             new[i] = v
  8.         end
  9.     end
  10.     return new
  11. end
  12.  
  13. return CloneTable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement