![]() For information on the built-in events for each class, see the API reference. Some commonly used ones include Players.PlayerAdded for when a user joins your experience, Player.CharacterAdded for when a user's Character spawns, and BasePart.Touched for when a part collides with another part. See Using Events for instructions on working with events in Studio. ![]() You can either connect a function to run code synchronously when it fires, or you can wait for an event to fire synchronously. Each script typically runs only once, so most game logic should be event-based. You can connect a function that does something in response to the event, such as hurt or heal the Character. For example, when a user's Character touches a Part, a Touched event fires. You can connect functions called event handlers to call each time an event fires. An event is a data type that represents an action or occurrence within Roblox.
0 Comments
Leave a Reply. |