Hey! I was wondering how could I make game-wide announcements IN CHAT so basically how do I make a system where I can make a announcement to every server in a game through the chat. I know you use messaging service but I can’t find good tutorials on it.
What about this one?
I have created an cross-server announcement system for you. You will have to download the RBXM file, because individually copying and pasting the scripts will take a long time.
Download this RBXM file:
AnnounceSystem.rbxm (2.6 KB)
Open your studio and right-click on ServerScriptService
Find a button that says ‘Insert from File…’ and click it
Navigate to the AnnounceSystem.rbxm (which you just downloaded) and insert it into ServerScriptService.
You have completed the setup, but now I will demonstrate how to send cross-server announcements.
- Create a server-sided script and place it in ServerScriptService.
- Copy and paste either the help/tutorial code or the working code below into your script:
local ServerScriptService = game:GetService("ServerScriptService") local AnnounceSystem = ServerScriptService:WaitForChild("AnnounceSystem") local CrossServer = require(AnnounceSystem:WaitForChild("CrossServer")) --[[ Instructions on how to use the CrossServer module: -- Announcing -- 1. The line of code to announce is: CrossServer:Announce("Test message") ]]
local ServerScriptService = game:GetService("ServerScriptService") local AnnounceSystem = ServerScriptService:WaitForChild("AnnounceSystem") local CrossServer = require(AnnounceSystem:WaitForChild("CrossServer")) local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(Player) CrossServer:Announce(Player.Name .. " has joined a server!") end)
- If you do not like the font or text color, you can edit it inside of the LocalScript in this path:
I have tested everything myself and it should be working fine. The downside of using MessagingService is that you can only input string/UTF+8 chars, not tables (including the message info
[font, color, etc] for instance). To solve this, you could use RemoteEvents.
I’m pretty sure that MessagingService only works in-game, so expect errors if you’re testing this in studio.
thanks! very nice and detailed!