Player Joined Message

Script (ServerScriptService)

local ReplicatedStorage = game:GetService('ReplicatedStorage')

local remoteEvent = ReplicatedStorage:WaitForChild('RemoteEvent')


local function onPlayerJoin(player)

remoteEvent:FireAllClients(player.Name)

end


game.Players.PlayerAdded:Connect(onPlayerJoin)

LocalScript (StarterPlayerScripts)

local ReplicatedStorage = game:GetService('ReplicatedStorage')

local remoteEvent = ReplicatedStorage:WaitForChild('RemoteEvent')


textColor = BrickColor.new('Lime green')


local function welcome(playerName)

game.StarterGui:SetCore('ChatMakeSystemMessage', {

Text = playerName..' has joined';

Font = Enum.Font.SourceSansBold;

Color = textColor.Color;

FontSize = Enum.FontSize.Size24;

})

end


remoteEvent.OnClientEvent:Connect(welcome)