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
 

Anyone know of a script that...

Previous Thread :: Next Thread 
korky5000 is not online. korky5000
Joined: 20 Aug 2008
Total Posts: 228
05 Feb 2013 12:49 PM
Makes a model regenerate when it's removed from the game?
ex. Your driving a car, you go off the cliff. You die and so does the car. Then you respawn and "POOF" the car is there? Anyone? I can't seem to get this one working on my own :x
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
05 Feb 2013 12:51 PM
You check if the model is nil, and if it is regen the model. This should work:

while true do
repeat wait() until workspace["carModelName"] == nil
game.Lighting["carModelName"]:Clone().Parent = workspace
end

Obviously change the two "carModelName" strings to the name of your car.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
05 Feb 2013 12:52 PM
"Anyone know of a script that..."
OH, MY, FLIPPIN, PAN!! Dem most annoying words ever! THIS IS NOT MARKET WITH PREMADE SCRIPTS! It's exactly like asking "Hey, do you guys know that english essay 'Water and all about it', can you give me it?"
Report Abuse
korky5000 is not online. korky5000
Joined: 20 Aug 2008
Total Posts: 228
05 Feb 2013 12:54 PM
I usually ask for help with scripts, not ask for just a script. But I couldn't seem to figure this one out because it would regenerate the empty model, now I can get it from the lighting. And Zars, I understand that. But sometimes I just need some help.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
05 Feb 2013 12:56 PM
Then write it bit differently, because it sounds like you want us to get our library filled with all made scripts, and check for one that clones model, if it's gone.

"How would you make auto regenerating script" would make more sense.




Well you can try something like:

game.Workspace.ChildRemoved:connect(function(child)
if child.Name == "Car" then
local nCar = game.Lighting.Car:clone()
end
end)
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
05 Feb 2013 12:58 PM
zars, that doesn't set the parent. :P

To set the parent, you'd need to do this:
nCar.Parent = workspace
or just change the clone line into one line:
game.Lighting.Car:Clone().Parent = workspace
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
05 Feb 2013 12:59 PM
I just showed him how he could try to do it. I have no idea where he want's that new car, or anything.
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