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: How would you...?

Previous Thread :: Next Thread 
creed0117 is not online. creed0117
Joined: 29 Sep 2009
Total Posts: 135
17 Dec 2011 05:49 PM
If i have a model that i dont want to be in the Starter Kit, How would i make it respawn after a certain time?
Report Abuse
dizzybrandon10 is not online. dizzybrandon10
Joined: 29 Mar 2010
Total Posts: 541
17 Dec 2011 05:58 PM
Like a regen script but happens once?


-db-
-Happy to help!-
Report Abuse
dizzybrandon10 is not online. dizzybrandon10
Joined: 29 Mar 2010
Total Posts: 541
17 Dec 2011 06:04 PM
Ok here it is:

model = game.Workspace.modelname
backup = model:clone

wait(30) -- Change 30 to what you want
model:Destroy()
model = backup:clone()
model.Parent = game.Workspace
model:MakeJoints()
Report Abuse
creed0117 is not online. creed0117
Joined: 29 Sep 2009
Total Posts: 135
17 Dec 2011 06:22 PM
Yes something like that, is it possible to edit that to make it loop? (keep respawning).

And if the Model has a name already, say for example the model name is "Rifle", would i put that in place of the "model" in your script? ^

Thanks,
Creed0117
Report Abuse
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
17 Dec 2011 06:23 PM
change modelname to the name of the Model, because model is a variable in this script.
Report Abuse
creed0117 is not online. creed0117
Joined: 29 Sep 2009
Total Posts: 135
17 Dec 2011 06:29 PM
So i would change the actual name of the gun "Rifle" to "Model", then it will work with the script above?
Report Abuse
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
17 Dec 2011 06:30 PM
no you'd have to change it to modelname (caps sensitive)
i'd just do:
model = game.Workspace.Rifle
Report Abuse
creed0117 is not online. creed0117
Joined: 29 Sep 2009
Total Posts: 135
17 Dec 2011 06:39 PM
Ok great thank you. Now i just realized that the gun isnt a model, but its a tool. Now would this still work if i changed it to tool?

tool = game.Workspace.Rifle
backup = tool:clone

wait(30) -- Change 30 to what you want
tool:Destroy()
tool = backup:clone()
tool.Parent = game.Workspace
tool:MakeJoints()

would this work?
Report Abuse
iamogggg is not online. iamogggg
Joined: 09 Sep 2008
Total Posts: 642
17 Dec 2011 06:47 PM
No. You're all wrong. ;P.
You want a timed regen for a player's tool?
Put a script into the tool itself, that clones the .Parent of the script, and then deletes itself, then puts the clone back into the tool's .Parent. You probably want to put the clone in first, though. Then delete the script's parent. (The tool.)
Report Abuse
iamogggg is not online. iamogggg
Joined: 09 Sep 2008
Total Posts: 642
17 Dec 2011 06:48 PM
and then deletes the tool after a delay,*
Report Abuse
creed0117 is not online. creed0117
Joined: 29 Sep 2009
Total Posts: 135
17 Dec 2011 07:00 PM
How would you write that out?
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