Hello, so basically I’m having trouble with the following code:
local value = game.workspace.Folder1.value
local Folder = game.ServerStorage.WeaponFolder
Folder[value.Value].Parent = game.Workspace
The value is inside of Folder1 and is a string Value…
so basically I want to search for the valuename inside of a folder but idk what I’m doing wrong…
-btw this code is an example but I don’t wanna show my actual line of coding because it would take to long to explain everything. Also if you have any questions feel free to ask.
You don’t unless you can guarantee the existence of something either through well-structured code or because you explicitly define these kinds of things in code.
Indexing a child is effectively the same thing as indexing members of a table. This is from a general Lua standpoint though, from a Roblox standpoint there is no defined article for it or anything. The line Folder[value] can be read as find <value> in <Folder>.