|
| 05 Jul 2016 02:00 PM |
local function recursiveSetDefaultsToDefault(instance) if instance:IsA("PartOperation") or instance:IsA("UnionOperation") then if instance then instance.CollisionFidelity = Enum.CollisionFidelity.Hull end end for i,v in pairs(instance:GetChildren()) do pcall( function()recursiveSetDefaultsToDefault(v) end) end end recursiveSetDefaultsToDefault(game) |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 02:01 PM |
Im not sure why "if instance" is coming after youve already run methods on it
"Tell me and I forget. Teach me and I remember. Involve me and I learn." - Benjamin Franklin |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 02:09 PM |
For some reason when I remove 'if instance then'
Then for some reason it says instance is not declared. :l |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 02:15 PM |
Is it possible that you're overwriting Instance, as in Instance.new()?
"Tell me and I forget. Teach me and I remember. Involve me and I learn." - Benjamin Franklin |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Jul 2016 04:29 PM |
| Halp, I just want all Unions to switch to Hull :P |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 06:03 PM |
| Bump, just in case someone knows how to do this, or fix it. |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 06:24 PM |
What exactly are you trying to do here? lolol
ohno |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 06:31 PM |
| Just trying to make every Union's CollisionFidelity "Hull" |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Jul 2016 06:36 PM |
| Na, it runs fine, but if I remove if instance then, then it gives me an error saying that instance is not declared. |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 06:38 PM |
Well, you do have two 'if instance then'
ohno |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 09:10 PM |
| Ye but the first one is if it is a UnionOperation or PartOperation then it continues. But then if I remove the second one (if instance then), then it won't work qq. |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 09:12 PM |
You can't have two functions, It won't work.
eh
ohno |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 09:47 PM |
Srry, when I remove "if instance then"
It is a blue line W "W001: Unknown global 'instance'" |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 09:50 PM |
I fixed it, but it still will not change the Unions to 'Hull'
local function recursiveSetDefaultsToDefault(instance) if instance:IsA("PartOperation") or instance:IsA("UnionOperation") then instance.CollisionFidelity = Enum.CollisionFidelity.Hull end for i,v in pairs(instance:GetChildren()) do pcall( function()recursiveSetDefaultsToDefault(v) end) end end recursiveSetDefaultsToDefault(game) |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 09:56 PM |
Is game suppose to be a variable? Or are you using it as the actual game?
ohno |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Jul 2016 11:48 PM |
| I guess you can't set Unions Collision VIA script, since I got it to print all Unions, but it won't do anything when I try to set the CollisionFidelity. |
|
|
| Report Abuse |
|
|