Skip to content

Instantly share code, notes, and snippets.

@spotco
Created February 27, 2021 04:04
Show Gist options
  • Save spotco/ad2a605d34611d59f07806bdba1ec960 to your computer and use it in GitHub Desktop.
Save spotco/ad2a605d34611d59f07806bdba1ec960 to your computer and use it in GitHub Desktop.
set_transparent_collision_group.lua
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