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
 

Re: [FIX] NPC spawning instant death glitch

Previous Thread :: Next Thread 
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
06 Nov 2014 10:02 AM
Simply do the parts first make joints and after that put the humanoid in, example:

do
Instance.new("Model",game.Workspace).Name = "Zombie"
game.Lighting:WaitForChild("Zombie")
for i,v in pairs(game.Lighting.Zombie:GetChildren()) do
if v.Name ~= "Humanoid" then
local zom = v:Clone()
zom.Parent = game.Workspace.Zombie
if zom:IsA("Part") then
zom:MakeJoints()
end
end
end
wait()
game.Lighting.Zombie.Humanoid:Clone().Parent = game.Workspace.Zombie
game.Lighting.Zombie:Destroy()
end
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
06 Nov 2014 10:04 AM
Why would you store stuff in lighting?

guise i have a siggy
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
06 Nov 2014 10:07 AM
Because why not?

Also here's a demo place (its uncopylocked)
http://www.roblox.com/Automatic-NPC-death-after-spawn-fix-demo-place?id=185741157

Ill maybe make it inactive later.
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
06 Nov 2014 10:09 AM
that's a bad practice, put stuff in replicatedstorage or serverstorage

guise i have a siggy
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
06 Nov 2014 10:10 AM
Yeah but still... no thanks, lighting will do fine :P
Report Abuse
LeitrisArcade is not online. LeitrisArcade
Joined: 15 May 2010
Total Posts: 2127
06 Nov 2014 12:30 PM
They made ServerStorage and ReplicatedStorage for a reason @OP

( ͡ಠ ͜ʖಠ)
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
06 Nov 2014 01:28 PM
@OP, if you don't use ServerStorage, the client has to download the instance into their hierarchy. Which is really tedious and dims loading speeds. Oh, and about the question, anytime I've used NPCs, I've never had this problem. I'd assume when it spawned, there was a delay between weld creation and part creation, or, even, some of the parts weren't in their anticipated offset, breaking any weld instances. Though, like I said, I've never had this problem, so, if the fixed demo doesn't do it for you, I'm not sure what will. Good luck. :P
-=Robo=-
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Nov 2014 01:51 PM
um, why not just clone the entire zombie model into workspace and then Zombie:MakeJoints()
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
06 Nov 2014 02:27 PM
That will instantly kill the zombie
And its just a demo / fix you dont need to use lighting...
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Nov 2014 02:32 PM
@Elite
you have Zero [0] ideas what you are talking about..

parenting each part == instant death

parenting model == instant death

parenting model and calling makejoints() == fix
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
06 Nov 2014 02:54 PM
@island
You have less idea what YOUR talking about.
If you are such a "pro" then why dint you try it and why does it work then huh?
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Nov 2014 02:58 PM
zombie = game.Lighting.Zombie:Clone()
zombie.Parent = Workspace
zombie:MakeJoints()

--works for me bro
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
06 Nov 2014 03:17 PM
Ugh...
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