|
| 17 Jun 2015 03:22 PM |
if PlayerAdded isn't complete
I'm assuming it does but not sure |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 17 Jun 2015 03:24 PM |
| if PlayerAdded isn't complete? As far as I know there is no state between incompletion and completion. If it isn't created yet then I highly doubt it can fire. I'm sure it's fired whenever a child of Players is removed (that's a instance of player) |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2015 03:25 PM |
| if a player's PlayerAdded is not complete does the core script have anything stopping them from firing PlayerRemovig |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2015 03:25 PM |
You mean like
game.Players.PlayerAdded:connect(function(player) print("Player added.") game.Players.PlayerRemoving:connect(function(player) print("Player removed.") end) end) |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2015 03:26 PM |
@lordrambo
this would mean you could potentially flood PlayerRemoving-based datastores by joining and leaving over and over again without proper security
and proper security would be annoying |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 17 Jun 2015 03:26 PM |
| You mean if the player leaves before the PlayerAdded code finishes? |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2015 03:27 PM |
"You mean like
game.Players.PlayerAdded:connect(function(player) print("Player added.") game.Players.PlayerRemoving:connect(function(player) print("Player removed.") end) end)"
no i was wondering if there was anything stopping a player from firing PlayerRemoving before their PlayerAdded was done |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2015 03:28 PM |
| I don't know, it is an interesting question. I'll see if it does. |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2015 03:28 PM |
"You mean if the player leaves before the PlayerAdded code finishes?"
well i always put a DataReady boolvalue in at the end of PlayerAdded (helps with everything, so useful), so that's not really a concern
holy crap i just realized the OP is a useless question, was thinking of something else, because my DataReady value already protects from that |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 17 Jun 2015 03:28 PM |
I don't know, but I'm guess that since :GetPlayers is the same as GetChildren, but with filtering out other instances, I could imagine PlayerRemoving is the same as ChildRemoved but for players. So as long as the instance was created in Players I'd figure it works.
But basically that adds to value since that's your initial assumption. This is a very specific question and I doubt anyone has a concrete answer, so you're probably best off testing it yourself. |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2015 03:30 PM |
| It actually does fire, regardless of if it is complete or not. |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2015 03:31 PM |
...
game.Players.PlayerAdded:connect(function(p) wait(120) print("Joined") end)
game.Players.PlayerRemoving:connect(function(p) print("Left") end)
Try it and see. |
|
|
| Report Abuse |
|
|