like if I did
local Returned = Function:InvokeClient(person)
and the client never returned anything, would it just yield the thread forever or is there a timeout after a certain period of time?
like if I did
local Returned = Function:InvokeClient(person)
and the client never returned anything, would it just yield the thread forever or is there a timeout after a certain period of time?
According to the wiki, yes.
Warning: Invocations (both InvokeServer and InvokeClient will yield until to corresponding callback has been defined. If the callback is never set, then the Script or LocalScript that invoked will not resume execution.
This is a reason it is known as bad practice to invoke the client. Infinite yields do happen and will cause issues.
I don’t necessarily think it’s bad practice to use InvokeClient. It really depends on how you’re using it and what your backup plans for terminating a client or the active thread are if there’s too long a timeout. Typically though, if those cases aren’t covered, then yes a pickle has arrived.
On personal experience, I can report that they will timeout when called from the client and no response is given after x
amount of time. An error will be thrown in this case.