The title mostly sums up my issue. I need to run multiple repetitions of the same code, so im trying to use a "for i,v in pairs" loop to do so (i have used them before). However I know that I need to use a table of values to put through the loop. So I have the variables I need, I put them in a table and put them in the loop. However I need to be able to change the initial variables under certin conditions determined in for loop. Problem is, I can only change the values in the table, and not the original values. Let me know if that makes sense, or if any clarification is needed.
Ex)
local Var = 5 local Var2 = 6 local Var3 = 7 local BigestNum = 0 local Nums = {Var5, Var6, Var7} for i,v in pairs(Nums) if i > BigestNum then i = BigestNum end end
(My goal is to change one of the original variable, and not the values stored in the table) I hope that makes sense.