How can I stop a for loop mid way before finishing?

How would i accomplish this.


for cycle = 1, 100 do
if cycle == 500 and workspace:FindFirstChild("Part") then

stop for loop before it finishes

else

other stuff

end


end



for cycle = 1, 100 do
    if cycle == 500 and workspace:FindFirstChild("Part") then
        break
    else
        --other stuff
    end
end
2 Likes