{"id":"superbithious/postie","name":"postie","scope":"superbithious","platform":"roblox","description":"Postie is a safe alternative to RemoteFunction with a timeout.","version":"1.1.1","latest":"1.1.1","versions":["1.1.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"c67473b0c7a1023ea2b6b5569f7fdabae10f3216d6cfa7aedb34b026dcbbdb59","likes":0,"downloads":0,"install":"forest install superbithious/postie","url":"https://forest.dev/p/roblox/superbithious/postie","files":"https://api.forest.dev/ai/package/roblox/superbithious/postie/files","readme":"\r\n# Postie\r\n\r\nPostie is a simple Roblox Luau library for client-server communication, providing a safe alternative to [RemoteFunction](https://create.roblox.com/docs/reference/engine/classes/RemoteFunction) with a timeout.\r\n\r\nTyped with Luau annotations, Postie is written to prevent mistakes from misuse of the API. For more information, view the [documentation](https://superbithious.github.io/Postie).\r\n\r\n## Usage\r\n### Client → Server\r\n```lua\r\n-- Context: Client\r\nlocal ReplicatedStorage = game:GetService(\"ReplicatedStorage\")\r\n\r\nlocal Postie = require(ReplicatedStorage.Packages.Postie)\r\n\r\nlocal timeout = 5\r\nlocal withColor = Color3.fromRGB(255, 0, 0)\r\nlocal atPosition = Vector3.new(0, 25, -20)\r\n\r\nlocal isOk, newPart = Postie.invokeServer(\"createPart\", timeout, withColor, atPosition)\r\n\r\nif isOk then\r\n\tprint(\"The server created the requested part:\", newPart)\r\nelse\r\n\tprint(\"The server wasn't able to create the part...\")\r\nend\r\n```\r\n```lua\r\n-- Context: Server\r\nlocal ReplicatedStorage = game:GetService(\"ReplicatedStorage\")\r\n\r\nlocal Postie = require(ReplicatedStorage.Packages.Postie)\r\n\r\nlocal function onCreatePart(player: Player, partColor: Color3, partPosition: Vector3)\r\n\tlocal newPart = Instance.new(\"Part\")\r\n\tnewPart.Color = partColor\r\n\tnewPart.Position = partPosition\r\n\tnewPart.Parent = workspace\r\n\treturn newPart\r\nend\r\n\r\nPostie.setCallback(\"createPart\", onCreatePart)\r\n```\r\n\r\n\r\n\r\n## License\r\n\r\nPostie is released under the terms of the [MIT License](https://opensource.org/licenses/MIT). View the [LICENSE](LICENSE) file for specific details.","readmeTruncated":false}