Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How would you make this regen unanchor the model?

Asked by 10 years ago

Trying to make this so it unanchors the vehicle so it doesn't mess up the welds. But how would I do so?

01script.Parent.Parent.Name = "CarRegen"
02local everything = {}
03local names = {}
04local children = game.ServerStorage:children()
05local debounce = false
06 
07for i = 1,#children do
08    if (children[i].Name == "Car") then
09        table.insert(everything, children[i]:clone())
10        table.insert(names, children[i].Name)
11    end
12end
13 
14function regen()
15    for i = 1,#everything do
View all 26 lines...

1 answer

Log in to vote
1
Answered by 10 years ago

I don't know if this will completely work, I think it will.

01script.Parent.Parent.Name = "CarRegen"
02local everything = {}
03local names = {}
04local children = game.ServerStorage:children()
05local debounce = false
06local ChangeColor = true -- true = changes colors; false = doesn't change colors.
07local NameOfPartsToColor = "ChangeColor" --This is where the name of the parts you want to change colors goes.
08 
09for i = 1,#children do
10    if (children[i].Name == "Car") then
11        table.insert(everything, children[i]:clone())
12        table.insert(names, children[i].Name)
13    end
14end
15 
View all 58 lines...
Ad

Answer this question