System chat not working

Hello, I am making a gui where I can send messages in the Roblox chat as: [System].

It doesn’t work sadly, here are my scripts:

Send Button:

local remote = game.ReplicatedStorage:FindFirstChild("FakeMessageRE")

local text = script.Parent.Parent.Message.Text
local Player = script.Parent.Parent.TextBox.Text

script.Parent.MouseButton1Click:Connect(function()
	remote:FireAllClients()
	print("Remote Fired")
end)

Message System which is in ServerScriptService:

local text = game.Players.LocalPlayer.PlayerGui.AdminMenu.FakeChat.Message.Text

local remote = game.ReplicatedStorage:FindFirstChild("FakeMessageRE")


local function SendSystemMessage()
	game.StarterGui:SetCore("ChatMakeSystemMessage", {
		Text = "[System]: " .. text;
		Color = Color3.fromRGB(255, 255, 255);
		Font = Enum.Font.SourceSansBold;
	})
end


remote.OnClientEvent:Connect(SendSystemMessage())

I’ve tried many things. It was first in the frame itself, then I moved it to serverscriptservice and it still didn’t work. Any help would be appreciated.

1 Like

You have to have game.StarterGui:SetCore("ChatMakeSystemMessage", {}) client side (LocalScript) and not server side.

If it’s client-side only I can see it. I want others to see it aswell

remove the extra bracket in the end of the last line of code

try

--local script
RemoteEvent.OnClientEvent:Connect(function(text)
    game.StarterGui:SetCore("ChatMakeSystemMessage", {
		Text = "[System]: " .. text;
		Color = Color3.fromRGB(255, 255, 255);
		Font = Enum.Font.SourceSansBold;
	})
end)

also filter the text

you are doing OnClientEvent inside a server script, also

FireAllClients() in a local script? so what you want to do instead is when the player makes an input, send it to the server and have the server do FireAllClients() then in a local script, it will receive this

(also if i’m wrong and this is a local script already, still would not work since it’s in ServerScriptService, add it anywhere in the client side, maybe startergui?)

FireAllClients() in a local script? so what you want to do instead is when the player makes an input, send it to the server and have the server do FireAllClients() then in a local script, it will receive this

How do i do this?

You put remote:FireAllClients() in a local script. You need to put it in a regular script instead.`

If I do, it won’t work right?

Because I have the LocalScript in a textbutton which if you click on, it fires.

You don’t use FireAllClients() in a local script. Use FireServer() instead.

So I still use the local script with FireServer in it?

That is correct.

It would be formatted like this:
remote:FireServer()

(Replace “remote” with your RemoteEvent’s name or local variable’s name.

Alright, I’ll try this. I’ll send another message if it doesn’t work.

1 Like

The remote did fire, which I tested using the print function. It’s just not saying the message in chat.

local PlayerGui = game.Players.LocalPlayer.PlayerGui
local text = PlayerGui.AdminMenu.Fakechat.Message.Text

local remote = game.ReplicatedStorage:FindFirstChild("FakeMessageRE")


remote.OnServerEvent:Connect(function()
	game.StarterGui:SetCore("ChatMakeSystemMessage", {
		Text = "[System]: " .. text;
		Color = Color3.fromRGB(255, 255, 255);
		Font = Enum.Font.SourceSansBold;
	})
end)

Is the local script in StarterPlayerScripts?

No, i’ll try that right now. give me 1 minute

1 Like

Nope, it’s still not saying the message in the chat.

I know what’s wrong now. Give me a moment.

1 Like

Just to clarify, you want to send messages into the system chat as a prank right?

Not really as a prank, I don’t really know what to use it for yet. It might be for like some event that’s only for that server.