I don't even know if the parameters for GetChildren() even do anything, but I thought to put the name of the parts I want indexed as a parameters which did nothing. How do I do this, if it's even possible without making individual variables for each part?
1 | local windows = script.Parent.Parent.Parts:GetChildren( "WindowParts" ) |
What you could do is make a dictionary table with the name of the parts and look through a specific service to look for the specific part
01 | local Strings = |
02 |
03 | { |
04 |
05 | [ "WindowParts" ] = true |
06 |
07 | } |
08 |
09 | local tab = { } |
10 | local descendants = workspace:GetDescendants() -- Location of where you have "WindowParts" |
11 |
12 |
13 | for _,index in pairs (descendants) do |
14 | if Strings [ index.Name ] then |
15 | table.insert(tab, index) |
16 | print (index) |
17 | end |
18 | end |