Advertisement
scanlon7

PLAYER JOIN / LEFT NOTIFICATION

Jan 2nd, 2020
5,508
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- MADE BY scanlon7
  2. -- FOLLOW ME ON TWEETER : @scanlon7RBLX
  3. -- HOPE THIS SCRIPT WILL HELP YOU :)
  4. -- IF YOU HAVE ANNY QUESTION ABOUT THIS SCRIPT JUST DM ME ON TWEETER
  5. --FOLLOW ALL OF THE STEP FOR THE SCRIPT TO WORK !! ( after you done u can deleted this whole script )
  6.  
  7.  
  8.  
  9. --Step 1 : Make a Script in Workspace and put this script
  10.  
  11. local events = game.ReplicatedStorage.Events
  12.  
  13. game.Players.PlayerAdded:Connect(function(plr) --When player joins the game
  14.     events.Added:FireAllClients(plr)
  15. end)
  16. --
  17. game.Players.PlayerRemoving:Connect(function(plr) -- When player leaves the game
  18.     events.Removing:FireAllClients(plr)
  19. end)
  20.  
  21. --Step 2 : Make a folder then rename it Events in ReplicatedStorage and put 2 REMOTE EVENT IN THE FOLDER
  22. --Step 3 : Renamed the remote event "Added" and "Removing"
  23. --Step 4 : Make a Local Script in StarterGui and rename it Message then put this script in there
  24.  
  25. local events = game.ReplicatedStorage.Events
  26. local starterGui = game.StarterGui
  27.  
  28. events.Added.OnClientEvent:Connect(function(plr) -- Message when player joins the game
  29.     starterGui:SetCore("ChatMakeSystemMessage",{
  30.         Text = plr.Name.." has joined the game!";
  31.         Color = Color3.fromRGB(0,255,255); --CHANGE THIS IF YOU WANT
  32.         Font = Enum.Font.SourceSansBold;
  33.         FontSize = Enum.FontSize.Size32;
  34.     })
  35. end)
  36. ---
  37. events.Removing.OnClientEvent:Connect(function(plr) -- Message when player leaves the game
  38.     starterGui:SetCore("ChatMakeSystemMessage",{
  39.         Text = plr.Name.." has left the game!";
  40.         Color = Color3.fromRGB(0,255,255); --CHANGE THIS IF YOU WANT
  41.         Font = Enum.Font.SourceSansBold;
  42.         FontSize = Enum.FontSize.Size32;
  43.     })
  44. end)
  45.  
  46. --Step 5 : Go try if the script work
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement