Hey! How do I delete a message in the chat from a client’s perspective and/or the server’s persepctive?
This is my current infustructure for creating chat messages on client and server:
local Functions = {}
function Functions.SendMessageToClient(Client:Player,Text:string,Colour:Color3, Font:Enum.Font,SizeMultiplier:number?)
local ToSendData = {
Text=Text;
Font=Font;
Color = Colour;
FontSize = 12*(SizeMultiplier or 1);
}
game.ReplicatedStorage.ClientChatMessanger:FireClient(Client,ToSendData)
end
function Functions.SendGlobalMessage(Text:string,Colour:Color3,Font:Enum.Font,SizeMultiplier:number?)
local Data = {
Text = Text;
Font = Font;
Color = Colour;
FontSize = 12*(SizeMultiplier or 1)
}
game.StarterGui:SetCore("ChatMakeSystemMessage",Data)
end
return Functions
local Input = game.ReplicatedStorage.ClientChatMessanger
Input.OnClientEvent:Connect(function(ChatData)
game.StarterGui:SetCore("ChatMakeSystemMessage",ChatData)
end)