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 » Scripting Helpers
Home Search
 

When a character dies (Small question)

Previous Thread :: Next Thread 
StygianBlade is not online. StygianBlade
Joined: 15 Sep 2011
Total Posts: 426
10 Aug 2012 12:04 PM
Is remove/destroy called on the character?

Please don't answer unless you're absolutely sure about it...
Report Abuse
Dasher911 is not online. Dasher911
Joined: 15 May 2011
Total Posts: 4105
10 Aug 2012 12:05 PM
Yes it is.
Report Abuse
StygianBlade is not online. StygianBlade
Joined: 15 Sep 2011
Total Posts: 426
10 Aug 2012 12:05 PM
Oh this includes when the player leaves the game also.
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
10 Aug 2012 12:21 PM
Question; why would this matter?

It might call :remove, there isn't really a way to check.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
10 Aug 2012 12:23 PM
I'm sure that it wouldn't call Destroy(), I don't think the character would even re-spawn.

† KMXD †
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
10 Aug 2012 12:24 PM
Plus :Destroy is a recent function, so it might be :Remove().

Though, it could also just reparent it to nil.

I'm not certain whether or not respawning is managed by Lua or by C, and if it's by C, then it's not necessarily determinable.
Report Abuse
StygianBlade is not online. StygianBlade
Joined: 15 Sep 2011
Total Posts: 426
10 Aug 2012 12:30 PM
Hehe I'm not sure why I keep asking questions that I eventually end up testing myself.

Anyways

@dasher

you probably misunderstood my question. I meant to ask whether the character was removed via remove/destroy or .Parent = nil

@Blue

I needed to know for a game I was working on. In case a player reset/left in the middle of a certain event I would have to back up the main function, and there would be a problem if remove/destroy was called

In case anyone was wondering it was just .Parent = nil (Remove recursively calls remove on all children preventing you to index previous children of object[same with destroy])

Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
10 Aug 2012 12:32 PM
Oh, you're right, you can test that.

I'll test right now, tell you what happens.
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
10 Aug 2012 12:38 PM
Yes = children of player model are still there
No = children of player model aren't children anymore


dies (0 health):
Yes

dies (falling)
Partially -- parts are deleted, other children remain

quits
Yes
Report Abuse
StygianBlade is not online. StygianBlade
Joined: 15 Sep 2011
Total Posts: 426
10 Aug 2012 12:39 PM
Thanks ^.^
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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