Assigning callback property to non function and non nil value doesn't error

Reproduction Steps
Assigning any callback to a non function and non nil value will reveal this issue.

local b ="BindableFunction"
b.OnInvoke = 1

Expected Behavior
The expected result of assigning a non function and non nil value to a callback property is an error.

Actual Behavior
Upon running the example code in the command line:
No error is generated from the assignment to OnInvoke, but Invoke errors because a non function and non nil value is set for OnInvoke.

Issue Area: Engine
Issue Type: Other
Impact: Low
Frequency: Very Rarely


Just to add on to this report, I found some odd behavior messing around:

As shown in the image above, the error is thrown twice upon calling Invoke


Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

1 Like

I wonder if this affects other callbacks like ProcessReciept or is isolated to bindables.

This error is reported by script analysis if you add “–!strict” at the beginning of your script.