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: NPC spawn don't work? (PLEASE HELP)

Previous Thread :: Next Thread 
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
21 Feb 2014 03:22 PM
I'm trying to find a script where Zombie models can spawn from lighting to workspace without dieing in the process. Here's one of the spawn scripts:

while true do
wait(40)
a = game.Lighting.Zombies:Clone()
a.Parent = game.Workspace
a:makeJoints()
wait()
end

For some reason the joints break when the zombies spawn. I can't figure out why. I just know that there's a problem with the joints since everything works well if the models are anchored.

Does anyone know a way to spawn NPCs/zombies from lighting without them dieing?
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
21 Feb 2014 03:29 PM
Anybody out there?? :c
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
21 Feb 2014 03:31 PM
a:MakeJoints()
Capitol 'm'
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
21 Feb 2014 08:21 PM
Same thing. Still don't work :|
Report Abuse
theroadrunner is not online. theroadrunner
Joined: 06 Oct 2010
Total Posts: 862
21 Feb 2014 08:24 PM
To be honest, AIs are glitchy pieces of crabgrass to spawn.
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
22 Feb 2014 02:07 AM
Bump
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
22 Feb 2014 02:57 AM
I'm not really sure but try using :MakeJoints() before setting the parent to Workspace. If not then I'm not sure, sorry.

When life gives you lemons... BURN HIS HOUSE DOWN! >:D
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
23 Feb 2014 01:57 AM
Yeah I'll try that. Good idea. But maybe joints can't be made in lighting.
If this doesn't work. Anybody else have any ideas?? This is the only problem from me making an awesome game.
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
23 Feb 2014 02:02 AM
Try this:

a = game.Lighting.Zombie:clone()

while true do
wait(40)
local zombie = a:clone()
zombie:MakeJoints()
zombie.Parent = Workspace
end
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
23 Feb 2014 01:46 PM
Nope, doesn't work. :c
I've got an another idea though. I can have the models anchored and spawn. Then I make the joints and unanchor them. However, there's more than one zombie in that model. How do I address them all and unanchor them all at the same time? Is it something to do with :GetChildren()?
Report Abuse
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
23 Feb 2014 04:15 PM
Bump 2
Report Abuse
jmasterj10 is not online. jmasterj10
Joined: 19 Sep 2010
Total Posts: 735
23 Feb 2014 04:37 PM
b = a:GetChildren()

for i = 1, #b do
b.PartNameHere.Anchored = true
wait()
b:MakeJoints()
b.PartNameHere.Anchored = false
end

-not sure if this will work, good luck
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