I'm confused about why it's still looping through this ui

I have a loop that basically looks for a value in UIs if they meet specific requirements. I have no idea why it’s erroring, I feel like I’m missing something really obvious. Here’s the code:

for _, ui in pairs(orderList:GetChildren()) do
			if ui:IsA("ImageLabel") or ui:IsA("ImageButton") and ui.Name ~= "Example" then
				print(reorderingNumber)
				ui.orderNumber.Value = reorderingNumber
				reorderingNumber += 1
			end
end

Here’s the error:
orderNumber is not a valid member of ImageLabel "Players.CheeseGodTheEpic.PlayerGui.OrderingSystemCashier.Background.FrameBackground.OrderList.Example"

This would indicate not all of the objects you’re looking for have a child named “orderNumber”.

I would consider checking the child objects in explorer and seeing if you can spot an inconsistency.

Additionally, you can just check if there’s a child named orderNumber instead of assuming one always exists.

if ui:FindFirstChild("orderNumber") then

    --code

end