Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
3

Differentiation of the two?

Asked by 8 years ago

What exactly is the difference between a Method and a Event? I get confused in mashing them together. I believe a method sets up the way for a function and a Event fires when a Method is called? Help?

1 answer

Log in to vote
2
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
8 years ago

An event is just like an event in real life -- it's when something happens. When something specific happens, the event will fire, as we call it. The Touched event will fire when a Part is touched. We can script so that certain things happen when the event fires, but that has nothing to do with what it is.

A method, on the other hand, is code set aside by roblox that we can execute on a specific object. It really has nothing to do with an event. part:Destroy() will destroy the part wherever we write it. It won't wait for something to happen, it will just do something when we tell it to.

Ad

Answer this question