Advertisement
HAHOOS

Has joined the game script

Jun 11th, 2019
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1.  
  2.  
  3.  
  4. local Players = game:GetService("Players")
  5.  
  6. function onPlayerAdded(player)
  7.     script.Parent.Text = player.Name .. " has joined the game "
  8.     wait(2)
  9.     script.Parent:TweenPosition(UDim2.new(0,0,0.5,0))
  10.     wait(4)
  11.     script.Parent:TweenPosition(UDim2.new(0,-500,0.5,0))
  12. end
  13.  
  14. Players.PlayerAdded:connect(onPlayerAdded)
  15.  
  16. for _,player in pairs(Players:GetPlayers()) do
  17.      onPlayerAdded(player)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement