I am not sure if this is a Roblox bug, but I can’t post in the bugs section anyway.
For some reason, whenever I press enter in a textbox it adds a character known as a ‘Carriage Return’ which is really annoying when I am trying to split up text. At the moment in my script, as soon as the user presses enter the textbox captures focus again so they can continue to type into the box.
I dont need a fix for how to get around this, I just want to know if anybody knows why it is happening.
Yeah so 2 means it is detecting the Carriage Return character. I think it is something to do with me capturing the textbox’s focus as soon as they press enter.
In the long long ago, DOS, Windows’ predecessor, had to interface with teletypewriters.
“CR” would send the typewriter back to the beginning, and “LF” would send it down a line.
Microsoft is obsessed with backwards compatibility, so they’ve still stuck with CRLF until today.
Unix (and Linux) always just used LF because they existed after teletypewriters were relevant.
Edit: No, that’s not the reason. See this Wikipedia article.
Mac OS used CR until Mac OS X, in which they switched to LF.