BindableFunction

Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.

ShotInstancecreatablecomingPrograms

Up and coming

Let projects call each other without requiring each other.

A BindableFunction is a named function slot in the tree: one project sets OnInvoke, the others call InvokeAsync. Insert one in the project tree or Clone one. A require loop is an error when a program runs, so this is how two projects that need each other connect; a BindableEvent beside it carries events.

Made with Instance.new("BindableFunction") or Clone().

Properties

NameTypeDefaultDescription
OnInvoke((...any) -> ...any)?The function that does the work, set by whoever provides it; setting it again replaces it.
Boundbooleanread-only

Methods

NameArgumentsReturnsDescription
InvokeAsync
yields
(...: any)...anyRuns OnInvoke and returns its results; errors when OnInvoke is unset, and is named Async because OnInvoke may wait.
From ShotInstance 33