I have some folders in ServerStorage
which are labeled 1, 2, 3, 4 and 5. There are items in each of them. I am using a function with a level
argument to do this.
Theoretically I could just do this:
function functions.GetLevelItem(level) local storage = game:GetService("ServerStorage") local search = tostring(level) local children = storage.search:GetChildren() end
I doubt this will work. Is there a workaround to this? Lag is not a concern here, so hacky solutions are OK as long as they are reliable.
You would need to use brackets, for example:
function functions.GetLevelItem(level) local storage = game:GetService("ServerStorage") local search = tostring(level) local children = storage[search]:GetChildren() end