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!
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'.