I'm trying to get the variables name from a table and apply the value of that variable to a table with the same variables name.

local table1 = {
value = CFrame.new(0,1,0) --trying to change this value to table2's value
}

local table2 = {
value = CFrame.new(0,2,0) 
}

4 comments

0

table1.value = table2.value

0

yes that's the simpler way of doing it but I'm stuck in a complex situation where I have more than one variable in each table that needs to be changed and I'd rather not go through the list of variables typing out each name

0

what you could do is loop through the dictionary, but since dictionaries have no order there's no guarantee that the orders will be in the order you want

0

I figured out a way through loop I was just stupid