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 » Scripting Helpers
Home Search
 

Re: help

Previous Thread :: Next Thread 
bombmaster93 is not online. bombmaster93
Joined: 13 Jan 2013
Total Posts: 442
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
sidekick601 is not online. sidekick601
Joined: 27 Feb 2012
Total Posts: 8734
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 is not online. 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
bombmaster93 is not online. bombmaster93
Joined: 13 Jan 2013
Total Posts: 442
12 Apr 2014 08:45 PM
will it keep doing the same thing every 250 seconds?
Report Abuse
sidekick601 is not online. sidekick601
Joined: 27 Feb 2012
Total Posts: 8734
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
bombmaster93 is not online. bombmaster93
Joined: 13 Jan 2013
Total Posts: 442
12 Apr 2014 08:48 PM
well good i want it to keep regening
Report Abuse
bombmaster93 is not online. bombmaster93
Joined: 13 Jan 2013
Total Posts: 442
12 Apr 2014 08:49 PM
wait floxxcon what would be scripts parent be?
Report Abuse
Foxconn is not online. Foxconn
Joined: 20 Feb 2011
Total Posts: 275
12 Apr 2014 09:37 PM
It should be a model
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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