#child inside table is being removed for some reason
1 messages · Page 1 of 1 (latest)
when i print equipped everything is there, but if i were to print inside the for loop, all of a sudden something is removed, am not removing it anywhere else in the script
is this issue that you're putting lua [1] instead of lua [i]?
mb, i didnt copy the code for some reason, i have [i] not [1]
so, any idea what the issue is
?
I do not
Because if you do this then should work fine
if ur using table.remove on it then will cause issues with the loop
can you expound on that
This is the linked example https://devforum.roblox.com/t/need-help-with-an-removing-elements-from-a-table-via-for-loop/652296
I have an array that contains player objects and I want to loop through the entire table to remove some player objects with a for loop, such as if the player or players get eliminated in a single cycle. I used the following: for key, val in ipairs(attached) do if val and val.Character and val.Character:FindFirstChild("Humanoid") and val.Charac...