Chapter 3: Event-Based Programming

In this chapter, we will learn about a specific way of programming, called event-based programming. Event-based programming allows us to write more optimized code. That is because our code will only run when a particular event happens. If this event does not happen, our code will not run. We will start by looking at functions that we can execute on instances instead of within scripts. After that, we will start listening to events. Once we know how to do this, we will make our own events. Then, we will learn how to use bindable events and bindable functions to do this. Finally, we will compare these custom events to modules, and we will even learn how to combine them.

The following topics will be covered in ...

Get Mastering Roblox Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.