Please enable JavaScript to use CodeHS

AP Computer Science Principles in Roblox

Lesson 1.7 Functions and Touched Event

Description

In this lesson, students will learn how to create basic functions using Lua and use them to improve the organization, readability, and flow of their programs. They will also learn how to implement the Touched function in their Roblox programs.


Objective

Students will be able to:

  • Explain the difference between defining and calling a function
  • Use functions in order to manage the flow of their programs
  • Increase the readability and organization of their code using functions