So recently the new messaging service came out. So I decided to create a shout system that works across all the servers once you send.
By using MessagingService (MessagingService) you are allowed to send messages to different servers nearly instantly! The issue is you don’t know how to efficiently handle it.
As most of you might know, the service does have limitations, which means you can only send a certain amount of requests per minute. PublishAsync allows 150 + 60 * number of players per minute, where SubscribeAsync only allows 5 + 2 * number of players per server.
The goal when making games can be very complicated when you hit throttles in the service, which can give many headaches to overcome. A simple solution to this issue is to limit as much as possible when sending the PublishAsync request, as well as how many Subscriptions you’re using. If you know you aren’t sending many cross server messages using this service, but each message has a separate use, you can get away with only using a single subscription without a worry. However, if you have a channel system where shouts will be going through, then having multiple subscriptions might be helpful as it’ll reduce latency.
Here, I’ve created a simple shout system that allows the client to select what channel they wish to send a message in, and it’ll be displayed to every single person in all the active servers for the game.
The place below contains everything in the image you see above that makes the shout system work. The scripts in the place contain comments explaining how I did everything which will guide you through the mechanics.
Roblox Shout System.rbxl (26.9 KB)
Shout System - Roblox Try it yourself!