game.Players.PlayerAdded:Connect(function(Player) game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = "[SERVER] "..Player.Name.." has joined the game!"; Color = Color3.new(0,1,0); Font = Enum.Font.SourceSans; FontSize = Enum.FontSize.Size24; }) end)
Put it in a LocalScript, running on the client, use RemoteEvents if necessary, e.g.
-- Client script game.Workspace:WaitForChild("MakeAChat").OnClientEvent:Connect(function(msg) game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = "[SERVER]: " .. msg; Color = Color3.new(0,1,0); Font = Enum.Font.SourceSans; FontSize = Enum.FontSize.Size24; }) end)
-- Server script local remote = Instance.new("RemoteEvent") remote.Parent = workspace remote.Name = "MakeAChat" game.Players.PlayerAdded:Connect(function(plr) remote:FireClient(plr, "Why, hello there!") -- Only sends message to player remote:FireAllClients(plr .. " has joined the game!") -- Sends message to everyone end)
The upside to this, is you can send a message to only one client at a time, or to everyone by using FireAllClients()