How can I send a system message to all the players in the server? Like in the chat?
I’ve tried to to search it up and stuff, but I haven’t found anything about sending it to all the players in the server. How can I do it?
You can probably use chat service to send messages, but you can also add custom gui and use remotes
1 Like
How? Can you give me some code
You can try something like this:
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = Players.LocalPlayer
local GeneralChannel: TextChannel = TextChatService:WaitForChild("TextChannels").RBXGeneral
local PREFIX = " [System] "
ReplicatedStorage:WaitForChild("DisplayMessage").OnClientEvent:Connect(function(Message)
GeneralChannel:DisplaySystemMessage(PREFIX..Message)
end)
2 Likes
Do you mean send a global message to all live servers at once, or just the local server?
Use a remote event that all clients connect to, and on the server use FireAllClients on the remote, on the client send the system message in RBXGeneral or RBXSystem