xULRICHx
|
  |
| Joined: 11 Mar 2012 |
| Total Posts: 94 |
|
|
| 09 Apr 2012 05:43 PM |
Wont Regen Mai Car
local box = script.Parent
local debounce = false
local everything = {} local names = {}
local children = game.Workspace:children() for i=1,#children do if (children[i].Name == "cart") then -- change My Model Name to ur model'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() new_thing = everything[i]:clone() new_thing.Parent = game.Workspace new_thing:makeJoints() end end
function onTouched(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") if humanoid~=nil and debounce == false then debounce = true wait(1) box.Transparency = 1 box.CanCollide = false
regen() wait(10) -- chage to the time you want befor it can regen again
box.CanCollide = true box.Transparency = 0
debounce = false end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|