For Loop skips over new children in folder using GetChildren()

My code loops through the children of a folder:

for _,i in playerInventory:GetChildren() do
	print(i.Name)

In order to add these frames to the player’s inventory:

when using print() to print out the results of GetChildren() the newly added children appear.
but looping through it doesnt.
NOTE: there are duplicate entries in the for loop but that doesn’t seem to be a problem.

pls help🥺

solved. i was calling return in an if statement inside the loop.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.