|
| 30 Mar 2012 08:34 AM |
| What is the PlayerLeft and how do I use it. |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2012 08:37 AM |
Inside game.Players is a method in which if a child of it is removed, some code will be executed,
For an example, if a player were to leave your game whilst this script was running:
game.Players.PlayerRemoving:connect(function(player) print("A player has left: " .. player.Name) end)
Then a message will appear saying that a player has left.
Alas, i do not know how to specifically select a player and execute a function when he leaves, which is what i'm currently researching, XD |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2012 08:45 AM |
So something like this?
game.Players.PlayerRemoving:connect(function(player) Instance.new("Message").Parent = Workspace Message.Text = "A player has left: " .. player.Name end)
|
|
|
| Report Abuse |
|
|
|
| 30 Mar 2012 08:47 AM |
Yup!
My bad, i did a print to the output, X) |
|
|
| Report Abuse |
|
|