Even if the Roblox text controls supported tabs, it probably wouldn’t look like the script in your screenshot, because the standard tab width is 8 spaces, which is a lot wider than that.
The correct way to handle this is to replace tabs with the specific desired number of spaces.
Set the font to Code or to RobotoMono and set TextXAlignment to left and this example should start working the way you expect using spaces.
This isn’t the first time we’ve been asked for tabs support, so it’s worth looking into. We’ll likely at first make tabs be 4 spaces wide, but leave out support for tabstops. For context, when tabstops are supported, the width of a tab actually changes depending on which column it was inserted.
You’re giving me workarounds.
In this case, I’ll be forced to change the font for the ENTIRE game to keep the standard aesthetic, just because I can’t use TABS!
Enter some text with spaces in front and press ENTER
Click on the text again and press ENTER again
Spaces in front will be REMOVED!
I opened this topic because I think this should be fixed.
But you, as part of the Roblox team, are you telling me that NOTHING WILL BE DONE about this?
Even if you could use tabs it wouldn’t change the fact that the spaces in the font you’re using are narrow and you need a lot of them to get what I gather is the desired amount of indentation.
If you want a standard amount of indentation regardless of font you would need to use separate Text Instances for the list bodies because you can’t embed a specific pixel width of indentation within text.
Is there a way to support tabs for copying and pasting? Running into issues where I use spaces to paste code but can’t default to tabs. This is in a plugin.
This has been fixed, a tab will now be the same width as 4 spaces. Note that tab stops are not supported, so a tab will always be the same width regardless of what column it starts from.