Created
February 27, 2021 04:04
-
-
Save spotco/ad2a605d34611d59f07806bdba1ec960 to your computer and use it in GitHub Desktop.
set_transparent_collision_group.lua
This file contains 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
local function r_itr(cur) | |
for _,child in pairs(cur:GetChildren()) do | |
r_itr(child) | |
end | |
if cur:IsA("BasePart") then | |
if cur.Transparency >= 0.95 or cur.CanCollide == false then | |
cur.CollisionGroupId = 1 | |
end | |
end | |
end | |
r_itr(game.Selection:Get()[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment