how Roblox events connect
Roblox events connect uniquely to each object within a loop, meaning a single script can handle multiple buttons independently without cloning the script.
- Every event in Roblox is unique to itself; `Part.Touched:Connect()` creates a distinct connection for each part it's applied to.
- Looping through a folder of parts and connecting an event within the loop ties a unique event to each part, allowing them to function independently.
- This method means a single local script can manage input events for multiple buttons, with each button's event firing independently.
- A shared variable (`lastButtonClicked`) can track which button was last clicked, enabling logic for actions between two distinct button presses.
- RetroStudio currently uses sequential execution, so understanding this flow is key.


