# BindableFunction

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/BindableFunction/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/BindableFunction

An object which allows for synchronous two-way communication between scripts on the same side of the client-server boundary. Scripts invoking a [`BindableFunction`](https://rapi.sleaze.dev/classes/BindableFunction.md) yield until the corresponding callback is found.

## Methods

### Invoke

```luau
BindableFunction:Invoke(...: any): ...any
```

- Tags: Yields

Invokes the [`BindableFunction`](https://rapi.sleaze.dev/classes/BindableFunction.md) which in turn calls the [`OnInvoke`](https://rapi.sleaze.dev/classes/BindableFunction.md) callback, returning any values returned by the callback.

Parameters:

- `arguments`: Values to pass to the [`OnInvoke`](https://rapi.sleaze.dev/classes/BindableFunction.md) callback.

Returns: Values returned from the [`OnInvoke`](https://rapi.sleaze.dev/classes/BindableFunction.md) callback.

## Callbacks

### OnInvoke

```luau
BindableFunction.OnInvoke: (...: any) -> ...any
```

Callback for when the [`BindableFunction`](https://rapi.sleaze.dev/classes/BindableFunction.md) is invoked with [`Invoke()`](https://rapi.sleaze.dev/classes/BindableFunction.md).

Parameters:

- `arguments`: The parameters sent through [`Invoke()`](https://rapi.sleaze.dev/classes/BindableFunction.md).

Returns: Values returned by the callback function.

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
