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
|
  |
| Joined: 26 Mar 2013 |
| Total Posts: 88 |
|
| |
|
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
|
  |
| 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
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
HillTribe
|
  |
| Joined: 26 Mar 2013 |
| Total Posts: 88 |
|
|
| 06 Jun 2014 09:00 PM |
ya im new to this can u help?? |
|
|
| Report Abuse |
|
|