Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Loop isn't working?

The 'elseif' works btw. So basically it's in a childadded function and if the child is in the table 'ItemsNotToRemove' then it should return and not remove it at all, the problem is it just ignores all items added rather than removing them if they're not in the table

ItemsNotToRemove = {"Part"}

elseif ItemsNotToRemove ~= nil then --Make sure table isn't empty
			 for _, Child in ipairs(ItemsNotToRemove ) do
				if Child then	
					return
				end
			end

2 comments

0

Give full script?

0

That's all that is needed

1 answer

✓ Accepted answer
if Child then 
	break
end

I think return is only used in functions and break for loops, but please give the full script so it makes more sense.

This discussion is preserved as it was. New answers, comments, and votes are closed.