Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

[SOLVED] how to post something to the chat for ALL clients?

Hello people! I am currently developing an ROBLOX game and I want to post something to each client's chat. How can I do that?

1 answer

✓ Accepted answer

Hello, To do that you have to use ChatMakeSystemMessage. Example

I made a LocalScript that will send a message when server says so through a RemoteEvent.

-- LocalScript
local StarterGui = game:GetService("StarterGui")

function SendMessage(Message)
	StarterGui:SetCore("ChatMakeSystemMessage", {
		Text = Message,
		Color = Color3.fromRGB(70,70,70),
		Font = Enum.Font.SciFi,
		FontSize = Enum.FontSize.Size14
})
end

game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(SendMessage)

Put it in StarterGUI.

The Function SendMessage will send a message (parameter 1) when there is a OnClientEvent. To send a message to a certain client use:

game.ReplicatedStorage.RemoteEvent:FireClient(game.Players.JakyeRU, "HEY")

To send a message to all clients use:

game.ReplicatedStorage.RemoteEvent:FireAllClients("HEY")

Example

4 comments

0

Thanks - It works

0

Make sure to accept the answer if it works. Thank you!

0

jaky this is not a script request site, dont just give them a script if they dont attempt to make one first

0

^

This discussion is preserved as it was. New answers, comments, and votes are closed.