Does adding too much spacing in a code ruin the script?

Whenever I look at a coding tutorial on YouTube and it doesn’t work, I look at the comments to see people always saying “there’s too much spaces in the script!” And why the script won’t work. Is this true? I’m just asking to see if it is since this could help me code better if it is.

2 Likes

No, whitespaces usually don’t matter in LuaU.

No, whitespaces are ignored by the complier.

value = 69






















                           print(value)

Does the same as

local value = 69
print(value)

Sometimes whitespaces are really good to write readable code:

-- One area for Services
TweenService = game:GetService("TweenService")
TCS = game:GetService("TextChatService")

-- One area for constants
SECRET_PASSCODE = "123456"
ANOTHER_CONSR = SECRET_PASSCODE .. "fhsjfh"

--One area for variables
AdminActivated = false

-- and another for functions
function LeakCode()
    print(SECRET_PASSCODE)
end

Maybe you get what I mean

1 Like

Ah I see. Thanks for the confirmation.

1 Like