Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Is there anyway to get a variable name instead of getting the value? [solved]

Asked by 6 years ago
Edited by Shawnyg 6 years ago

This question has been solved by the original poster.

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) 
}
0
table1.value = table2.value User#19524 175 — 6y
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 ScriptingCon 52 — 6y
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 User#19524 175 — 6y
0
I figured out a way through loop I was just stupid ScriptingCon 52 — 6y

Answer this question