ConnectOptions
The extra settings you can pass to Event:connect to slow down, filter or limit how often your callback runs.
Fields
debounce
number?
How many seconds after each run that new firings are skipped, which can be 0 or more.
per_player
boolean?
Whether each player gets their own
debounce, while a firing without a Player uses the shared one.once
boolean?
Set it to
true to disconnect after the first run, so the function only runs once.filter
((...any) -> boolean)?
A function that gets the event's values and returns whether this firing counts, and a firing that doesn't count, or whose filter errors, never uses up
once or debounce.