I'm researching Lua in Roblox and came across this word. Please explain what she is responsible for?
so if you're running a loop and there's the word "break" inside, it means that you wanna stop the loop:
for i = 1, 10 do -- this is a loop print(i) -- printing the number which "i" is at, in the output if i == 5 then -- if i is equal to 5, break -- this will stop the loop end end
try it, and watch carefully in the output. To open the output, click "View" on the tab up on the screen, try to find "Output" and click it. Did you see, it printed the numbers all the way to 5, and not to 10, because when it arrived at 5, we broke the loop with the word "break".
Hope this helped!
For more info, check here https://developer.roblox.com/en-us/articles/Loops