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

What is a callback, and when would you use it?

Asked by
yurhomi10 192
10 years ago

I'm a little confused on what callbacks are. I don't know what the purpose of them. Is this method of coding much more efficient?

EDIT: I'm mostly asking this because I want to learn how to use DevProducts, and then this came along..

http://wiki.roblox.com/index.php?title=ProcessReceipt

1 answer

Log in to vote
3
Answered by 10 years ago

A callback is similar to an event, but generally there can only be one function associated with the action. In the case with ProcessReceipt, you set a function to that property of the service and then that function is the callback. If you set another function to that property, the old one will be replaced.

Ad

Answer this question