Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.