loopy1222
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 252 |
|
|
| 05 Feb 2015 05:48 PM |
I made a simple regeneration script that takes a model from the Lighting and pastes it to the Workspace. It works fine, but the problem is that it regenerates once, and works once but then when I try to regenerate again it just Destroys the model without copying the model from the lighting again although it is still there.
Here is my script:
r = game.Lighting.BoomBoomRagdolls rc = r:Clone() local function regenerate() rc.Parent = game.Workspace rc:MakeJoints() end
local function MouseClicked3(player) game.Workspace.BoomBoomRagdolls:Destroy() wait(1) regenerate() end
script.Parent.ClickDetector.MouseClick:connect(MouseClicked3)
Any idea what I am doing wrong? Thanks. |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2015 05:51 PM |
You're making only one copy of your Ragdolls.
r = game.Lighting.BoomBoomRagdolls
local function regenerate() rc = r:Clone() rc.Parent = game.Workspace rc:MakeJoints() end
local function MouseClicked3(player) game.Workspace.BoomBoomRagdolls:Destroy() wait(1) regenerate() end
script.Parent.ClickDetector.MouseClick:connect(MouseClicked3)
|
|
|
| Report Abuse |
|
|
loopy1222
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 252 |
|
| |
|