So, I made a code where if you joined message pop-up in chat that worked Ok, But how about the left message. I tried multiple times and it didn't work what's wrong with it?
This script in ServerScriptService
local MessageEvent = game.ReplicatedStorage.PlayerLeftMessageEvent
game.Players.PlayerRemoving:Connect(function(Player)
repeat wait() until Player.Character or Player.CharacterRemoving:Wait()
local text = "{System} "..Player.Name..", Has left to the game"
local color = Color3.fromRGB(255,0,0)
local font = Enum.Font.Cartoon
MessageEvent:FireAllClients(text,color,font)
end)
What wrong with that's it's not working??
This for StarterGUI
local StarterGui = game:GetService("StarterGui")
local MessageEvent = game.ReplicatedStorage.PlayerLeftMessageEvent
MessageEvent.OnClientEvent:Connect(function(text,color,font)
StarterGui:SetCore("ChatMakeSystemMessage",{
Text = text,
Color = color,
Font = font
})
end)

2 comments
Please, give us the error!
It doesn't appear any errors in Scrpit Analysis or logs what do i do?