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: After death of zombie the parts scatter BUT..

Previous Thread :: Next Thread 
Gamemaking is not online. Gamemaking
Joined: 17 Jun 2013
Total Posts: 7686
25 Nov 2014 09:41 AM
I don't want the parts to scatter, I want them to instantly disappear after they die.

How do I do this? I'm not a very good scripter in lua yet
Report Abuse
Gamemaking is not online. Gamemaking
Joined: 17 Jun 2013
Total Posts: 7686
25 Nov 2014 09:53 AM
hm
Report Abuse
HexC3D is not online. HexC3D
Joined: 30 Jun 2012
Total Posts: 10044
25 Nov 2014 09:55 AM
if zombie.Health == 0 then
a = zombie:GetChildren()

for i = 1,#a
if a[i].ClassName == "Part then
a[i]:remove()
end

end

Or just remove the whole model.

if zombie.Health == 0 then
zombie:remove()
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
25 Nov 2014 09:58 AM
hex no

local zombie = script.Parent
zombie.Humanoid.Died:connect(function()
zombie:Destroy()
end)

guise i have a siggy
Report Abuse
HexC3D is not online. HexC3D
Joined: 30 Jun 2012
Total Posts: 10044
25 Nov 2014 09:59 AM
Just ADD humanoid before health.

like Humanoid.Health
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
25 Nov 2014 10:00 AM
hex, yours is inefficient cuz you'd have to loop check, plus remove is deprecated and doesn't completely remove parts.

guise i have a siggy
Report Abuse
Egzekiel is online. Egzekiel
Joined: 10 Jan 2011
Total Posts: 1079
25 Nov 2014 10:00 AM
zombie=script.Parent
if zombie.Humanoid.Health==0 then
zombie:Destroy()
end
Report Abuse
HexC3D is not online. HexC3D
Joined: 30 Jun 2012
Total Posts: 10044
25 Nov 2014 10:00 AM
XDDDDDDD, I forgot.


There is an event/ plus the script runs before... Yeah I get.

I need to think before pressing 'Enter'
Report Abuse
Gamemaking is not online. Gamemaking
Joined: 17 Jun 2013
Total Posts: 7686
25 Nov 2014 10:11 AM
looks to me like egz' and dev's are about the same, so I'll try and see if either of them work. Thanks guys for the help.
Report Abuse
Gamemaking is not online. Gamemaking
Joined: 17 Jun 2013
Total Posts: 7686
25 Nov 2014 10:15 AM
Weird, looks like ever since I put the script in, the zombies don't spawn at all.
Report Abuse
Gamemaking is not online. Gamemaking
Joined: 17 Jun 2013
Total Posts: 7686
25 Nov 2014 10:24 AM
Both egz' and dev's have the same result - no zombies spawn
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
25 Nov 2014 10:46 AM
are they spawning dead?

guise i have a siggy
Report Abuse
Gamemaking is not online. Gamemaking
Joined: 17 Jun 2013
Total Posts: 7686
25 Nov 2014 10:50 AM
Usually when they spawned before there were very few that spawned dead and then scattered into pieces, but most of them spawned with 95% health and they do not have health regeneration.

Now they just don't spawn at all
Report Abuse
Gamemaking is not online. Gamemaking
Joined: 17 Jun 2013
Total Posts: 7686
25 Nov 2014 10:52 AM
If you want to see what's going on, here is the game:

http://www.roblox.com/Five-Nights-of-ZOMBIES-place?id=144931698



The zombies spawn in the center of the map, I'm trying to remake Shaakra's Zombie Defense Tycoon, and I'm gonna make it better.
Report Abuse
Gamemaking is not online. Gamemaking
Joined: 17 Jun 2013
Total Posts: 7686
25 Nov 2014 02:56 PM
bump
Report Abuse
Gamemaking is not online. Gamemaking
Joined: 17 Jun 2013
Total Posts: 7686
25 Nov 2014 05:12 PM
Nvm dev, it was an issue I created, sorry lol

Your script works fine
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