This here is a function that does something. I have been trying to write out what it does and I couldn’t figure out what line 10 and 15 does. I know that it adds something into a table but how.
CreateConfiguration = (function(Configurations, Table)
--gets the table of the first parameter
print(Table)
for i, v in pairs(Configurations:GetChildren()) do
print(Table)
--finds if the values classname is a value
if string.find(v.ClassName, "Value") then
--if it make its name a clone of its value
print(Table)
Table[v.Name] = v:Clone()
--if it isnt and it is either a folder or configuration class
print(Table)
elseif v:IsA("Folder") or v:IsA("Configuration") then
--then make the values name become
Table[v.Name] = Functions.CreateConfiguration(v, Table)
end
print(Table)
end
return Table
end),
The parameter configurations is a folder containing different value types for a gun.
the Table parameter is just an empty table that gets filled up. I wanna know how it is getting filled up what confuses me is that it goes to the spot in the table getting the current value being cycled throughs name but that line itself adds it to the table.

4 comments
What is this script from, if you don't know what it does it sounds like a free model script which is stated in the website guidelines to not post for us to fix.
I don’t want you to fix it cause it works
I want you to tell me why it works. I am using this model as an example for what I do and don’t understand.
I wanna know why it works so I can do something like it myself and not just copy other peoples work