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

How do you add a regen to a car?

Previous Thread :: Next Thread 
SmartHannah10 is not online. SmartHannah10
Joined: 10 Oct 2010
Total Posts: 1470
17 Jul 2011 10:47 AM
Just wondering...I suck at building.
Report Abuse
ninjablade5544 is not online. ninjablade5544
Joined: 08 Dec 2009
Total Posts: 2140
17 Jul 2011 11:17 AM
A button regen or a auto regen?
Report Abuse
ninjablade5544 is not online. ninjablade5544
Joined: 08 Dec 2009
Total Posts: 2140
17 Jul 2011 11:18 AM
For an auto regen here is the script



local model = game.Workspace.MyModelName

local message = Instance.new("Message")
message.Text = "Regenerating "..model.Name
local backup = model:clone()
local regenerating = false

function regenerate()
--Don't regenerate again if we're already doing it!
if regenerating then
return
else
regenerating = true
end

model:remove()

-- Display the regen message for 4 seconds
message.Parent = game.Workspace
wait(4)
message.Parent = nil

-- Put the copied model back into workspace
model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()

-- After 30 seconds, allow the model to be regenerated again
wait(30)
regenerating = false
end

--Connect a function that regenerates the model when a player touches the button
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
regenerate()
end
Report Abuse
ninjablade5544 is not online. ninjablade5544
Joined: 08 Dec 2009
Total Posts: 2140
17 Jul 2011 11:19 AM
And im not gonna say wrong forum. It could get pretty messy in the scripting helpers.
Report Abuse
SmartHannah10 is not online. SmartHannah10
Joined: 10 Oct 2010
Total Posts: 1470
17 Jul 2011 11:20 AM
Thank you for helping.
Report Abuse
ninjablade5544 is not online. ninjablade5544
Joined: 08 Dec 2009
Total Posts: 2140
17 Jul 2011 11:29 AM
KK THAT WILL 1000 ROBUX. JUST KIDDING
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Building 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