So what I’m trying to do is to make a way to quickly send messages to the chat using a RemoteEvent. But when sending anything to the remote it won’t send anything.
The server side script works but it seems to be the local script that is having trouble
-- SERVER SCRIPT
ClientChat:FireClient(player,"Saving "..string.len(HTTPService:JSONEncode(saveList)))
-- LOCAL SCRIPT
local ClientChat = game.ReplicatedStorage:WaitForChild("ClientChat")
--Get the StarterGui service
local StarterGui = game:GetService("StarterGui")
--Use a repeat to make sure we get our system message
--The repeat will only stop once the function successfully runs
ClientChat.OnClientEvent:Connect(function(msg)
--if c == nil then c = Color3.fromRGB(0,255,255) end
print(msg)
--Run SetCore method inside the pcall
--The first argument of SetCore is the method we wish to use
--In this case, the second argument is a dictionary of data for the chat message
repeat
wait() --Wait to prevent crashing
local Success,err = pcall(function()
--Run SetCore method inside the pcall
--The first argument of SetCore is the method we wish to use
--In this case, the second argument is a dictionary of data for the chat message
StarterGui:SetCore("ChatMakeSystemMessage", {
["Text"] = "[ADMIN] "..msg; --The chat message
["Color"] = Color3.fromRGB(255, 255, 255); --Chat message color, defaults to white
["Font"] = Enum.Font.SourceSansBold; --Chat message font, defaults to SourceSansBold
})
end)
if not Success then
print(err)
end
until Success
end)