What's end supposed to do? If it was what I thought it was, then it'd be at the end of all you wrote, like a period. But it continues on in code. Why does there have to be an end at the end of everything you do? Because in my thought if it was to have an "end", then nothing would go after the "end", but you can type more after it?? Could somebody explain to me the general way that end works?
✓ ANSWER ACCEPTED
What does "end" in scripting generically meant to do?
1 answer
✓ Accepted answer
Ends are used to end certain statements such as if , else,for and other statements you could consider an end to be a period it basically ends a block of code. Depending on how many statements you have will determine how many ends you need at the end of a script.
if 5 == 5 then
print("True")
end-- ending of a block of code
if 5 == 5 then
print("HI")
else
if 5 ~= 5 then
print("False")
end
end -- this has two statements therefore two ends are needed to end code. So in conclusion is is used to end blocks of code
print("pie") -- this doesn't need an end because there are no statements.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thank you for helping me out, I've been wondering why you have to put an end, to make the script complete. I know it's somewhat alike to a period, but it's alittle different, it confuses me time, but thanks!!
Yeah no problem just think of it as a period to the ending of a sentence in this case the end of a block of code :).