|
| 12 Apr 2014 08:21 PM |
how can i make a regen script that regens every 250 seconds? do you know a tutorial that could help me? |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2014 08:33 PM |
Make sure the object you want to regen has a copy in lighting
tell the script to remove the one in game and replace it with the one in lighting by copying it to workspace.
(Make sure the object is in the correct location before cutting and pasting to lighting) |
|
|
| Report Abuse |
|
|
Foxconn
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
|
| 12 Apr 2014 08:35 PM |
It's best to have the controller script in a different area than the item(s) that are being regenerated. Try this:
script.Parent.Model:Clone().Parent = game.Lighting local waitTime = 250
function regen() script.Parent.MODEL_NAME_HERE:Destroy() local copy = game.Lighting.MODEL_NAME_HERE:Clone() copy.Parent = game.Workspace end
while wait(waitTime) do regen(model) end |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2014 08:45 PM |
| will it keep doing the same thing every 250 seconds? |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2014 08:46 PM |
@bomb the script that he posted will keep doing the same thing
if you want a regen via touch of a button use .Touched function |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2014 08:48 PM |
| well good i want it to keep regening |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2014 08:49 PM |
| wait floxxcon what would be scripts parent be? |
|
|
| Report Abuse |
|
|
Foxconn
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
| |
|