Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ 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.