Skip to content

Instantly share code, notes, and snippets.

@spotco
Last active March 28, 2017 07:38
Show Gist options
  • Select an option

  • Save spotco/e107ffe9b18afcd091f3e55046d36830 to your computer and use it in GitHub Desktop.

Select an option

Save spotco/e107ffe9b18afcd091f3e55046d36830 to your computer and use it in GitHub Desktop.
EnvSetCanCollide.lua
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