In the typed Lua beta, when you try to write to a callback (as in RemoteFunctions), the editor complains because Cannot add property [name] to sealed table [class]
where [name]
and [class]
are the property name and the ClassName respectively.
To replicate this, make a script and paste this into it.
--!strict
local foo = Instance.new("RemoteFunction")
foo.OnServerInvoke = function() end
It will create a warning in Script Analysis. The same effect can be observed for things like BindableEvent.OnInvoke
and MarketplaceService.ProcessReceipt
. In fact, every Callback I tested had this problem, leading me to believe they simply aren’t included in the type system.
This issue is present on studio version 0.442.3.409454
.