Coding fundamentals
Learn digital citizenship with Roblox. A full course created for middle to high school students. This session has students learning coding.
Lesson Description: Explore the coding concepts of functions, loops, and if/then statements with mini-projects that can be added to Roblox games like color changing platforms and traps.
| Lesson Objectives |
|
| Skills and Concepts |
|
Overview#
| Duration | Activity | Description |
|---|---|---|
| 5 min | Introduction | Introduce the session. |
| 20 min | Guided Tutorial: Working with Properties | Modify the color properties of parts using scripts. |
| 35 min | Guided Tutorial: Coding a Trap | Code a trap using functions and if/then statements. |
| 5 min | Wrap-up | Reflect on project and recap concepts learned. |
Lesson Plan#
Introduction#
- Explain today's session will be different mini-projects to develop skills in scripting.
Guided tutorial - Work with properties#
Lead students through the following tutorials:
Encourage students to troubleshoot independently if they have an error. To help, have them try:
- Redoing their last few steps.
- Asking a peer for help.
As students write code, check that students write comments that accurately describe the code.
- Not Specific: Runs code
- Improved: Changes color of PracticePart
Guided tutorial - Code a trap#
Lead students through the following tutorials:
When working with if statements, check that students indent code to look like code samples. This helps make the code more readable, which becomes important as scripts grow larger.
Wrap-up#
- Recap what students have created and vocabulary: property, loop, and function.
Appendix#
Troubleshooting and classroom tips#
- While coding, remind students to double-check their capitalization or ask a peer to check their work. Even one incorrect letter can cause an error in longer words like
FindFirstChildWhichIsA. - Try the following below to help students develop troubleshooting skills.
- Purposely make a mistake in your code and ask students to identify the error. This can be easily turned into a game with students as you challenge them to find the error in a limited amount of time.
- Write a partial line of code and ask students to complete it.
- Utilize 'Ask 3 Before Me' where students ask three peers before asking the teacher for help. It's important for students to become comfortable independently troubleshooting as they advance to more complex projects.