> For the complete documentation index, see [llms.txt](https://stellardocs.bulkgames.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stellardocs.bulkgames.us/network/oninvoke.md).

# OnInvoke

Sets up a RemoteFunction endpoint to invoke the provided function

```lua
Network:OnInvoke(name, func)
```

The function receives a Player instance and any additional arguments

**Only works on the server**
