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
 

I need some regen help

Previous Thread :: Next Thread 
HillTribe is not online. HillTribe
Joined: 26 Mar 2013
Total Posts: 88
06 Jun 2014 08:51 PM
this is what I want to happen:
-the car regens when I click a button, and when I exit seat the car disappears.

the problem:
-when I jump out of the seat, the car disappears and wont regen the next time I click the regen button.

how do I fix this so that the car keeps regening when even though it gets removed when I exit the vehicle?
Report Abuse
HillTribe is not online. HillTribe
Joined: 26 Mar 2013
Total Posts: 88
06 Jun 2014 08:52 PM
yo help would be nice
Report Abuse
yankeejr is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
06 Jun 2014 08:53 PM
how about

script.Parent.Position = Vector3.new(0, 0, 0)
Report Abuse
HillTribe is not online. HillTribe
Joined: 26 Mar 2013
Total Posts: 88
06 Jun 2014 08:58 PM
heres the script.. where would i put the local box = script.Parent


local box = script.Parent


local debounce = false

-- DO NOT GROUP THIS WITH YOUR MODEL!

local everything = {model}
local names = {model}

local children = game.Workspace:children()
for i=1,#children do
if (children[i].Name == "ATV") then -- Replace the Admin door name with your models's name.
table.insert(everything, children[i]:clone())
table.insert(names, children[i].Name)
end
end


function regen()
for i=1,#everything do
game.Workspace:findFirstChild(names[i]):remove() -- Dont mess with this stuff.
new_thing = everything[i]:clone()
new_thing.Parent = game.Workspace
new_thing:makeJoints()
script.Parent.Position = Vector3.new(0, 0, 0)
end
end

function onTouched()
script.Parent.BrickColor = BrickColor.new(26)

regen()
wait(5)-- This is how long it takes untill the regen button will work again.


script.Parent.BrickColor = BrickColor.new(104)


debounce = false
end

script.Parent.ClickDetector.MouseClick:connect(onTouched)

--This regen button was made by mccody,hope you like(d) it!
Report Abuse
yankeejr is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
06 Jun 2014 08:59 PM
free model script.
Report Abuse
HillTribe is not online. HillTribe
Joined: 26 Mar 2013
Total Posts: 88
06 Jun 2014 09:00 PM
ya
im new to this can u help??
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