Please enable JavaScript to use CodeHS

AP Computer Science Principles in Roblox

Lesson 2.8 Break and Debounce

Description

In this lesson, students will learn how to “clean up” their Roblox programs by preventing a player from activating an event too often. Students will learn how to use a break statement to end a loop and a debouncing technique to prevent a function from running too many times.


Objective

Students will know how to:

  • Use a break statement to end a loop
  • Use a debouncing technique to prevent a function from running more times then intended