Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
LawlR 182
6 years ago
Edited 6 years ago

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.

0
see? I knew you could do it. LoganboyInCO 150 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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;
})
0
Did you read what I wrote? LawlR 182 — 6y
0
yes, but i'm not giving you the whole script, cause that's what you have to do on your own. LoganboyInCO 150 — 6y
0
I already had what you posted. LawlR 182 — 6y
Ad

Answer this question