pasje1312
(pasje1312)
#1
So I have this npc spawner, that loops through something, but it’s all in a while loop and I only want to break the for loop:
while true do
wait(10)
for i,v in example:GetChildren do
-- other stuff
break -- this break will end up down there
end
end
-- down here
1 Like
Have you tried replacing break with continue? Please let me know the result
Hot_Coder
(Hot_Coder)
#3
Try Using “Do”
while true do
wait(10)
for i, v in ipairs(example:GetChildren()) do
do
return
end
end
end
pasje1312
(pasje1312)
#4
both ways didn’t work, btw continue just makes the script continue so nothing happends
Try returning it.
while true do
wait(10)
for i,v in example:GetChildren do
-- other stuff
return
end
end