Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why can't I do Table:GetChildren()?

Asked by 4 years ago

I want to make a table:GetChildren(). The reason I'm doing this is because I want to save the data, so I make a table. But, turns out I cannot do Table:GetChildren(). This is my error:

ServerScriptService.DataStoreScript:20: attempt to call a nil value

Am I missing something? This is my script(Line 20-23):

                for _, v in ipairs(Table:GetChildren()) do
game.Lighting.Folder:FindFirstChild(v.Name):Clone().Parent = workspace.Folder
end
0
What exactly are you trying to do by table:GetChildren? Cause :GetChildren is for instances not data. Benbebop 1049 — 4y
0
I want to get everything that's in the table instead of going through each item one by one. Also, players can have a lot of items and when I do :GetAsync(), it would be a pain to go through everything one by one. RealJefff2000 68 — 4y
1
Just writing Table alone will do that then. Table:GetChildren (If it even worked) would just give you another table anyway. Benbebop 1049 — 4y

Answer this question