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

[SOLVED] How do I send a server message in the chat that all players can see?

I would like to send a message to the chat every time someone dies, but I don't know how to send the message.

function Msg()
	local Num = math.random(1, #DeathTexts)
	game.StarterGui:SetCore("ChatMakeSystemMessage", {
		Text = ("[SERVER] " .. PlrName .. DeathTexts[Num]);
		Font = Enum.Font.ArialBold;
		Color = Color3.fromRGB(255, 0, 0);
	})
end

I tried this but it only works from a local script, therefore only the player that died will see the message.

Solved: Just use FireAllClients() when the user dies, passing the user's name.

1 comment

0

see? I knew you could do it.

1 answer

This should do.

Place it as a localscript inside of StarterPlayer > StarterPlayerScripts

game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
	Text = "Your message here";
	Color = Color3.new(0, 0, 255);
	Font = Enum.Font.SourceSansBold;
	FontSize = Enum.FontSize.Size24;
})

3 comments

0

Did you read what I wrote?

0

yes, but i'm not giving you the whole script, cause that's what you have to do on your own.

0

I already had what you posted.

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