Last active
March 28, 2017 07:38
-
-
Save spotco/e107ffe9b18afcd091f3e55046d36830 to your computer and use it in GitHub Desktop.
EnvSetCanCollide.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function r_set_collide(itr) | |
| if itr.Name == "Ground" then | |
| return | |
| end | |
| if itr.ClassName == "Part" or itr.ClassName == "UnionOperation" or itr.ClassName == "MeshPart" then | |
| itr.CanCollide = false | |
| itr.Anchored = true | |
| end | |
| for _,child in pairs(itr:GetChildren()) do | |
| r_set_collide(child) | |
| end | |
| end | |
| r_set_collide(game.Selection:Get()[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment