So I Am Making So A Bot Chats In The Roblox Chat Box But For It To Appear For Everyone I Need To Send It To All Clients For It To Appear But It Fails With No Error Appear.
My Client Script:
script.Parent.Send.MouseButton1Click:Connect(function()
print("0") -- To Test Whats Wrong
game.ReplicatedStorage.RemoteFrom:FireServer(script.Parent.Message.Text)
end)
It Seems That The Server Script Never Receives The Fire Event From The "My Client" Script
Server Script:
script.Parent.RemoteFrom.OnServerEvent:Connect(function(Data)
print("1")
game.ReplicatedStorage.RemoteSend:FireAllClients(Data)
end)
Local Script Receiving Server Script:
local StarterGui = game:GetService("StarterGui")
game.ReplicatedStorage.RemoteSend.OnClientEvent:Connect(function(Data)
print("2")
repeat
wait()
local Success = pcall(function()
StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "[Him]: "..Data;
Color = Color3.fromRGB(255, 0, 0);
Font = Enum.Font.SourceSansBold;
TextSize = 18
})
end)
until Success
end)

4 comments
Do all of those print statements output something? Why are you using a pcall for a remote event?
The PCall Is To Make Sure The Bot Sends The Message Through Correctly Not For The Remote Event. The Print Was To See Where The Error Was As It Wasn't Saying A Error In The Output. But The Problem Is Fire The Server From My Client Script To Server Script
OnServerEvents has two variables. The first one is the player that sends it, the second ones that you send with them. So you need to make a new variable before "data"
You should not be using remote events on that. Use remote functions. remote functions is build for that purpose. remote events is one way communication (client to server) (server to client) but you can use remote function that is a two way communication (client to server to all clients/client) (server to client to server)