Hello all, I was wondering how I'd make a message that ALL servers would make, as I'd like to warn players when I shutdown all servers for updates and such. Thanks in advance!
✓ ANSWER ACCEPTED
How would one go about making a server-wide message?
1 answer
✓ Accepted answer
Create a script in ServerScriptService and put the code below inside of it. When you update the message, it will change for all the servers.
local MessagingService = game:GetService("MessagingService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
MessagingService:SubscribeAsync("Global Chat", function(message)
local msg = message.Data
local tim = message.Sent
-- Your code after the message gets updated.
end)
ReplicatedStorage.Events.globalchat.OnServerEvent:connect(function(Player, msg)
MessagingService:PublishAsync("Global Chat", msg)
end)
You can update the message in Studio or in the game by using 'game:GetService("MessagingService"):PublishAsync("Global Chat", "Your new message.")' or you can create a GUI that will fire the remote 'globalchat'.
2 comments
1
I'm sure you probably know how to edit it to become like an announcement or so.
0
Thanks! This service will definitely help me in the future!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
I will advise you to read this article https://developer.roblox.com/en-us/api-reference/class/MessagingService