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 |
|
|
|
| 17 Dec 2011 05:58 PM |
Like a regen script but happens once?
-db- -Happy to help!- |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 09 Sep 2008 |
| Total Posts: 642 |
|
|
| 17 Dec 2011 06:48 PM |
and then deletes the tool after a delay,* |
|
|
| Report Abuse |
|
|
creed0117
|
  |
| Joined: 29 Sep 2009 |
| Total Posts: 135 |
|
|
| 17 Dec 2011 07:00 PM |
| How would you write that out? |
|
|
| Report Abuse |
|
|