Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I create a Table with :GetChildren() ?

Is there a way where I can make the name of the key in the table the .Name of the part and make the Value of the key the part.Value?

local Dictionary = {

}

local modelC = game.Workspace.Model:GetChildren()
for i,v in pairs (modelC) do
	local part = modelC[i]
end

1 answer

✓ Accepted answer

Is this what you were looking for?

local Dictionary = {}

local modelC = game.Workspace.Model:GetChildren()
for i,v in pairs (modelC) do
    Dictionary[v.Name] = v.Value 
end

My only question is parts don't have a value unless you've made some type of Value.

This discussion is preserved as it was. New answers, comments, and votes are closed.