Event (Lua)

Events are used to trigger something to happen when something occurs in the game. To use events, you must first understand functions. Use the connect member function of an event to connect it to a function that handles the event.

Basic example (simple kill brick, place this script inside the brick):

To see all events, the Object Browser in Roblox Studio is helpful. The function you connect will take different arguments depending on what event it is.