roblox

The BindableFunction class is used to represent functions in the game hierarchy. It allow functions defined in one script to be called by another script. It can be used by a script to give access to functions by an external script. Since callbacks do not replicate, they cannot be used to share functions between the server and clients. This class was added in version 51.

Methods

Invoke(arguments: Tuple): Tuple

  • YieldsThis function can yield the script it is used in.
Parameters
NameType
argumentsTuple

Causes the function assigned to OnInvoke to be called. Arguments passed to this function get passed to OnInvoke function.

  • Thread safety: unsafe

Callbacks

OnInvoke(arguments: Tuple): Tuple

Parameters
NameType
argumentsTuple

Should be defined as a function. This function is called when Invoke is called. Number of arguments is variable.

  • Thread safety: unsafe

External links