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 » Scripters
Home Search
 

Why this nu work?

Previous Thread :: Next Thread 
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
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
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
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
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
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
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
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
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
05 Jul 2016 02:15 PM
I don't believe so
Report Abuse
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
05 Jul 2016 04:29 PM
Halp, I just want all Unions to switch to Hull :P
Report Abuse
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
05 Jul 2016 06:03 PM
Bump, just in case someone knows how to do this, or fix it.
Report Abuse
Service_Scripting is not online. Service_Scripting
Joined: 28 Mar 2013
Total Posts: 944
05 Jul 2016 06:24 PM
What exactly are you trying to do here?
lolol


ohno
Report Abuse
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
05 Jul 2016 06:31 PM
Just trying to make every Union's CollisionFidelity "Hull"
Report Abuse
Service_Scripting is not online. Service_Scripting
Joined: 28 Mar 2013
Total Posts: 944
05 Jul 2016 06:32 PM
Any errors?


ohno
Report Abuse
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
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
Service_Scripting is not online. Service_Scripting
Joined: 28 Mar 2013
Total Posts: 944
05 Jul 2016 06:38 PM
Well, you do have two 'if instance then'


ohno
Report Abuse
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
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
Service_Scripting is not online. Service_Scripting
Joined: 28 Mar 2013
Total Posts: 944
05 Jul 2016 09:12 PM
You can't have two functions,
It won't work.

eh


ohno
Report Abuse
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
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
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
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
Service_Scripting is not online. Service_Scripting
Joined: 28 Mar 2013
Total Posts: 944
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
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
05 Jul 2016 10:11 PM
Game is the actual game.
Report Abuse
DatOneDeveloper is not online. DatOneDeveloper
Joined: 11 Mar 2011
Total Posts: 1185
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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