GetChildren from folder


I am trying to get all parts from a folder and save their positions into a table/array.

Below is what I thought would work but it will not allow me to save the location of the part.

what am I doing wrong?

local tilePositions = {}

for i, child in ipairs(game.Workspace.ChessSet.Tiles:GetChildren()) do
	tilePositions[i] =, child.Y, child.Z)

You would have to do, child.Position.Y, child.Position.Z). Or just do tilePositions[i] = child.Position.

1 Like