generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Does anyone know if PlayerRemoving fires

Previous Thread :: Next Thread 
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
17 Jun 2015 03:22 PM
if PlayerAdded isn't complete

I'm assuming it does but not sure
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
17 Jun 2015 03:24 PM
what?
Report Abuse
lordrambo is not online. 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
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
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
KlinkStudios is not online. KlinkStudios
Joined: 31 Oct 2013
Total Posts: 563
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
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
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 is not online. 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
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
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
KlinkStudios is not online. KlinkStudios
Joined: 31 Oct 2013
Total Posts: 563
17 Jun 2015 03:28 PM
I don't know, it is an interesting question. I'll see if it does.
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
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 is not online. 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
KlinkStudios is not online. KlinkStudios
Joined: 31 Oct 2013
Total Posts: 563
17 Jun 2015 03:30 PM
It actually does fire, regardless of if it is complete or not.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image