Ipairs not choosing correctly in order

So I’m trying to recreate small minigame from Cult of the Lamb, and in that minigame the first die you put in a cell, it immediately goes to the first available slot, closest to the middle. The cells in explorer are labeled 1, 2, and 3, in 3 different columns. In the first column as seen in one of the videos, it works just fine, but in the other 2 columns, it just opts for the bottom??? This isn’t even a mistake in numbering, this is just happening. I’m using ipairs for this, but it’s just not cutting it. This is the order in which it appears.
https://cdn.discordapp.com/attachments/180763895592386560/1013619886402060348/Knucklebones_-_Roblox_Studio_2022-08-28_21-17-57.mp4

But instead, for some reason, it just does this.
https://cdn.discordapp.com/attachments/180763895592386560/1013619885634490460/Knucklebones_-_Roblox_Studio_2022-08-28_21-18-44.mp4

I saw a similar thread about it, this one: Ipairs loop of a folder starts at child #2 but I tried it and it hasn’t worked.

I couldn’t have incorrectly numbered it, because, well, look.

At this point I’ve tried a lot of things and I’m really tempted to give up, so any suggestions would be very appreciated.
(I’m not sure if the discord links will embed, but for some reason trying to upload the video didn’t work.)

EDIT: My code might not be helpful but,

	for _, v in ipairs(rowPos[selectedColumn]:GetChildren()) do --the "rowPos[selectedColumn]:GetChildren()" is basically just selecting the chosen column.

This is literally all it is. I don’t know why it won’t work otherwise.

2 Likes

Could you show more code from where that ipairs loop originates from?

local children = rowPos[selectedColumn]:GetChildren()
for i = 1, #children - 1 do --Subtract one because one of the children is named 'ColumnScore'.
	local frame = rowPos[selectedColumn]:FindFirstChild(i)
	if frame then
		--Do code.
	end
end
2 Likes

This works like a charm, thank you!

I’ll post some more screenshots when I finish the game, thank you so much!