A thread was recently made about string.sub working incorrectly, but the question was deleted before I could answer. The problem was an easy one to make; the code looked similar to:
local s = "Hello world!"
print(s:sub(1, 5) == "ell") --> false -- why?
I'll post my answer to this question below for those who may come across a similar issue.

4 comments
?
There's nothing wrong with self answering a question because in the case that someone asked a question, received or didn't receive an answer, and deleted the question, doing this will help people in the future.
Also, anyone able to moderate, please vote to lock this so there won't be anymore spamming of question marks
Questions like these should be moved to Forums. Not here