Datatype · Userdata

Event

userdatasince 1.6.9-alpha

Event object that runs connected functions upon a specific occurrence.

Methods

3

#Event:Connect(callback: function) → EventConnection

since 1.6.9-alpha

Connects a function to be ran whenever the event occurs and returns the connections

Parameters

callbackfunction

The function to be ran

#Event:Once(callback: function) → EventConnection

since 1.6.9-alpha

Similar to Connect but upon being fired once it will automatically disconnect your connection

Parameters

callbackfunction

The function to be ran

#Event:Wait() → ...any

yields

Yields your thread until the event occurs and returns the arguments the event fired you with