If you want the server to "Chat" when the player joins and the player leaves, you would need to put this into a LocalScript inside StarterPlayerScript:
See comments in the code to get a better insight of how this script works!
If there are any typos, then please excuse me, I wrote this code here and now.
02 | game.StarterGui:SetCore( "ChatMakeSystemMessage" , { |
03 | Text = "[Server]: " ..game.Players.LocalPlayer.Name.. " has joined the game!" ; |
04 | Color = Color 3. new( 255 , 255 , 255 ); |
05 | Font = Enum.Font.SourceSansBold; |
06 | FontSize = Enum.FontSize.Size 24 ; |
10 | game.Players.ChildAdded:connect( function (player) |
11 | if not pcall ( function () |
12 | game.StarterGui:SetCore( "ChatMakeSystemMessage" , { |
13 | Text = "[Server]: " ..player.Name .. " has joined the game!" ); |
14 | Color = Color 3. new( 255 , 255 , 255 ); |
15 | Font = Enum.Font.SourceSansBold; |
16 | FontSize = Enum.FontZise.Size 24 ; |
23 | game.Players.ChildRemoved:connect( function (player) |
24 | if not pcall ( function () |
25 | game.StarterGui:SetCore( "ChatMakeSystemMessage" , { |
26 | Text = "[Server]: " ..player.Name .. " has left the game!" ); |
27 | Color = Color 3. new( 255 , 255 , 255 ); |
28 | Font = Enum.Font.SourceSansBold; |
29 | FontSize = Enum.FontZise.Size 24 ; |
For more information, visit this link:
http://wiki.roblox.com/index.php?title=API:Class/StarterGui/SetCore
If this helped you out, make sure you accept the answer!