Hi, maybe you can help me .
I would like a message from system to appear in the chat with a previously defined text at the push of a button. Every player should see the message.
Like above, I suggest you are using a local script trying to communicate the server and making a message, I suggest doing client-server-clients stuff, for example: client sends info to server using Remote:FireServer(), server retrieves it, server send info to every other client using Remote:FireAllClients(), clients recieved it with .OnClientEvent, do stuff
Use :Fire instead, and to connect it is .Event:Connect()
Edit: BindableEvents and RemoteEvents are different, BindableEvents are for client-client and server-server signals, while RemoteEvents are for client-server, server-client, client-server-client and server-client-server signals
Go to StarterPlayer > StarterPlayerScripts and add “LocalScript” into it.
Now, copy and paste this script into TextButton’s script;
local player = game.Players.LocalPlayer
local button = script.Parent
local SystemMessageController = game.ReplicatedStorage.SystemMessageController
script.Parent.MouseButton1Click:Connect(function() -- It checks if mouse button is clicked
local message = "TRIAL" -- You can write something else instead of "TRIAL".
SystemMessageController:FireAllClients(message) -- Makes it appear for all the players.
end)
Finally, copy and paste this code into StarterPlayer > StarterPlayerScripts
game.ReplicatedStorage.SystemMessageController.OnClientEvent:Connect(function(message)
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = message, -- System makes the written message appear in the chat
Font = Enum.Font.Antique, -- Changes the font of the text
Color = Color3.fromRGB(0, 255, 0), -- Changes the color of the text
TextSize = 18, -- Changes the size of the text
})
end)