kirda

1

Feb 22nd, 2021 (edited)
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2.  
  3. local Table = {}
  4.  
  5. Players.PlayerAdded:Connect(function(player)
  6.     Table.Variable = 123 -- for example
  7.        
  8.     print(player.Name .. " joined the game!")
  9. end)
  10.  
  11. Players.PlayerRemoving:Connect(function(player)
  12.     Table.Variable = nil -- remove from table
  13.        
  14.     print(player.Name .. " left the game!")
  15. end)
Advertisement
Add Comment
Please, Sign In to add comment