local PhysicsService = game:GetService("PhysicsService")
PhysicsService:CreateCollisionGroup("NoCollide")
PhysicsService:CollisionGroupSetCollidable("NoCollide", "NoCollide", true)
for _,v in pairs(script.Parent:GetDescendants()) do
if v:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(v, "NoCollide")
end
end
Though if you mean, collide with nothing at all, you need to do a bit more. This turns off all collisions from one group with all groups.
local PhysicsService = game:GetService("PhysicsService")
PhysicsService:CreateCollisionGroup("NoCollide")
for _, group in pairs(PhysicsService:GetCollisionGroups()) do
PhysicsService:CollisionGroupSetCollidable("NoCollide", group, false)
end
for _,v in pairs(script.Parent:GetDescendants()) do
if v:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(v, "NoCollide")
end
end
Throw this back in there somewhere if you want it to collide with things in its own group though