What is TODO and how do I use it?

I was looking through some scripts from the gun set Roblox made and I was wondering what this line of code did.

self.startupFinished = false -- TODO: make startup time use a configuration value

I’d like to note that “TODO” was highlighted green (if you write it in a comment yourself it does that too), so I figured it must do something. If anybody knows what it does please let me know.

1 Like

I looked it up a bit and there was a studio feature post about it Make the TODO highlighting also support todo - Feature Requests / Studio Features - DevForum | Roblox
It looks like it was added in the highlighting changes, however TODO doesn’t actually do anything

1 Like

TODO is a specialized keyword for comments to make them stand out. It shows the author of the script what they had previously planned for future implementation.

2 Likes

It’s the same for Python; TODO basically states something either you still need to do, or something that the line of code does, meaning it is used for commenting on specific parts of a code. It’s mostly there for readability from what I understand. Sometimes, you need to mark parts of your code for future reference, such as areas of optimization and improvement, possible changes, questions to be discussed, and so on. That is just what TODO does within Python coding, and I am 99% sure it’s the same in Luau.

1 Like