␡
- Installing Roblox Studio
- Let's Take a Tour
- Opening the Output Window
- Writing Your First Script
- Error Messages
- Leaving Yourself Comments
- Summary
- Q and A
- Workshop
- Exercise
This chapter is from the book
Leaving Yourself Comments
In the previous code, you may notice the sentence -- Destroys whatever touches the part. This is a comment. Comments begin with two dashes. Anything on the same line as the dashes doesn’t affect the script.
Coders use comments to leave notes to themselves and others about what the code does. Trust us: When you haven’t looked at a piece of code in months, it’s very easy to forget what it does.
The following code shows what it might look like to add a comment at the top of the script you wrote earlier in this hour:
-- What do I want for dinner? print("I want lots of pasta!")