In-Studio Script Executor

Hello! Thanks for the suggestion. I’ve been doing some research on how to do auto indentation and I’ve found out that concatenating the text with “\n” supposedly adds a new line allowing me to do something like this:

CodeBox.FocusLost:Connect(function()
     CodeBox.Text..="\n" --adds new line
     CodeBox.Text..="     "  --indents
     CodeBox:CaptureFocus()
end

But the issue I’ve come across with this method is that “\n” for some reason is adding 3 new lines instead of 1.

EDIT: I realized that is because it was firing multiple times so I added a debounce and it seems to be working. Now I just need to detect when it should indent and make a few other adjustments and it should be ready!