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 » Scripters
Home Search
 

Re: Regeneration Script

Previous Thread :: Next Thread 
loopy1222 is not online. 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
XlAscensionlX is not online. XlAscensionlX
Joined: 17 Apr 2014
Total Posts: 872
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 is not online. loopy1222
Joined: 03 Sep 2008
Total Posts: 252
05 Feb 2015 05:55 PM
Thanks for the help!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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