Unclear error "[event] is not a valid member of [class]"

If you write something like function workspace.Changed() end then you will see the error “Changed is not a valid member of Workspace”, which is not correct. Somebody wrote something along the lines of function RemoteEvent.OnServerEvent() end and got “OnServerEvent is not a valid member of RemoteEvent”, which confused them, because it most definitely is. They were confusing it with the callback OnServerInvoke of RemoteFunctions.

1 Like

Same happens for those two lines:

workspace.Destroy = 123
workspace.Changed = 123

It’s probably because setter-wise, non-properties don’t have any. (read-only properties probably have one that’s made to error)