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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: I need help with a normal timed regen script.

Previous Thread :: Next Thread 
dralion is not online. dralion
Joined: 12 Apr 2008
Total Posts: 17440
18 Oct 2012 03:00 PM
Here's the script I recieved from someone else:

model = game.Workspace.MyModelName
messageText = "Regenerating MyModelName..."

message = Instance.new("Message")
message.Text = messageText
backup = model:clone()

while true do
wait(300) -- regenerate this model every 300 seconds

message.Parent = game.Workspace
model:remove()

wait(4) -- display regen message for 4 seconds

model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()
message.Parent = nil
end


The concept of the place I'm using it at is there's a train that crashes. I want the train to regen every 5 minutes, but it doesn't even regen at all. Can someone help?
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
18 Oct 2012 03:10 PM
modelname = "Hehe"
model = game.Lighting["Car"] --use lighting
messageText = "Regenerating" "" ..modelname.. --concat

message = Instance.new("Message")
message.Text = messageText
backup = model:clone()

while true do
wait(300) -- regenerate this model every 300 seconds

message.Parent = game.Workspace

wait(4) -- display regen message for 4 seconds

a = model:Clone()
a.Parent = game.Workspace
a:MakeJoints()
message.Parent:Destroy()
end
Report Abuse
buddy249950 is not online. buddy249950
Joined: 30 Jun 2016
Total Posts: 3536
18 Oct 2012 03:23 PM
>model = game.Lighting["Car"] --use lighting

Why are you using ["Car"] when you can just use .Car?
That is completely pointless.
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
18 Oct 2012 03:31 PM
@Buddy

Because maybe he has a space in the name of his model.

think.
Report Abuse
buddy249950 is not online. buddy249950
Joined: 30 Jun 2016
Total Posts: 3536
18 Oct 2012 03:33 PM
I don't see his model name anywhere in his script. So how can I think?
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
18 Oct 2012 03:34 PM
@Buddy

I don't see no spaces anywhere.. And plus he had MODELNAMEHERE

So how can I think?
Report Abuse
dralion is not online. dralion
Joined: 12 Apr 2008
Total Posts: 17440
18 Oct 2012 04:16 PM
Oh, it does have a space. I should have mentioned that.

It's called "Modern Train".

Maybe that's where I messed up.
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