According to Roblox’s styleguide, the correct way (and IMO the only good looking way) to format a multi-line if statement is like so:
if
someReallyLongCondition
and someOtherReallyLongCondition
and somethingElse
then
doSomething()
doSomethingElse()
end
https://roblox.github.io/lua-style-guide/#newlines-in-long-expressions
However, Studio’s auto-formatter will try to indent the second, third, etc, lines of the condition, which is not correct.
For reproduction's sake
if
true
and true
and true
then
print()
end