Getting data inside a folder in ServerStorage

Hi,

I have a folder in ServerStorage called Shop1 and trying to wait for the child of this folder ToolModels but can’t figure out the code, below is what i have so far, and not working.

local var = game:GetService(“ServerStorage”):WaitForChild(“Shop1”):WaitForChild(“ToolModels”):GetChildren()

2 Likes

What are you trying to do exactly? This code is going to make a “table” with all of "ToolModels’s children.

yes I am trying to get all the tools in the folder to a table

Yes then that code is right. If you are having any problems you probably misspelled one of the instances. The following code could be used to print everything in the table:

local var = game:GetService(“ServerStorage”):WaitForChild(“Shop1”):WaitForChild(“ToolModels”):GetChildren()

for i, v in pairs(var) do
       print(v)
end)