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: Regen Script Issues

Previous Thread :: Next Thread 
THEMENDEZKID is not online. THEMENDEZKID
Joined: 18 Aug 2011
Total Posts: 2401
19 Jul 2015 03:14 AM
The script works as expected, but it doesn't nullify the model that was already regenerated, resulting in adding the model instead.

local regenTime = 8
local messageTime = 2


local Model = script.Parent
local Message = Instance.new("Message")

if Model ~= workspace then
Message.Text = "Regenerating " ..Model.Name

local Backup = Model:Clone()

while true do
wait(regenTime)

Model:Destroy()

Message.Parent = game.Workspace
wait(messageTime)
Message.Parent = nil

Model = Backup:Clone()
Model.Parent = game.Workspace
Model:makeJoints()
end
else
error("Script not put in a Model! Nothing to regenerate!")


end
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
19 Jul 2015 04:53 AM
So what you're trying to do is destroy a model (that destroys EVERYTHING inside of it as well) when the script is also inside the model?
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